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

Default chron issue for dataset 17597 #3

Open
davidfastovich opened this issue Feb 14, 2019 · 1 comment
Open

Default chron issue for dataset 17597 #3

davidfastovich opened this issue Feb 14, 2019 · 1 comment

Comments

@davidfastovich
Copy link

bulk_baconizing.Rmd throws this error at Chunk 9:

There are multiple default models defined for the best age type. Error in build_agefiles(param = params[i, ], ageorder = ageorder, datasets = dataset_list, :
object 'max_chron' not found

The issue is in the build_agefiles.R script line 78. A logical test is performed using the variable max_chron which is not defined anywhere else in the function. The issue is reproducible if you run the bulk_baconizing script and set dataset_list <- get_dataset(x = 17597) .

@davidfastovich
Copy link
Author

I think I managed to fix the issue, I just added max_chron <- sort(chronid, decreasing = TRUE) above modeldefault$default <- new_default & max_chron == max(chronid) which is where the code failed. This produces a small bug but doesnt seem to effect the final Bacon output, but it works. For sites where the date is the same, so they are differentiated by chronology ID, the core top date is out of order in the .csv, but Bacon doesnt seem to have a problem with it. I was able to run 308 sites successfully with this fix without any wonky age models (outside of the normal Bacon oddities that sometimes come up).

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

No branches or pull requests

1 participant