Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make calc_WodaFuchs2008() work on more RLum.Results objects #219

Merged
merged 2 commits into from
Sep 9, 2024
Merged

Make calc_WodaFuchs2008() work on more RLum.Results objects #219

merged 2 commits into from
Sep 9, 2024

Conversation

mcol
Copy link
Contributor

@mcol mcol commented Sep 9, 2024

A quick and dirty fix for the example posted in #199.

I ended up with the tryCatch() solution because in the tests we have already an example in which the data slot is present but it's not the first entry:

obj <- calc_CommonDose(ExampleData.DeValues$BT998, verbose = FALSE)
expect_silent(calc_WodaFuchs2008(obj))

In other words, with my approach we don't change the expectation of that test.

mcol added 2 commits September 9, 2024 15:18
Some RLum.Results objects may not contain the "data" slot, such as those
produced by calc_WodaFuchs2008() itself. In such case we revert to taking
the first slot, as in general it's the most meaningful.
With just one data point, it's possible to cause nls() to hang, so we
don't allow that.
@RLumSK RLumSK merged commit 25aeb10 into R-Lum:dev_0.9.x Sep 9, 2024
10 checks passed
@mcol mcol deleted the issue_199 branch September 9, 2024 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants