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

formal argument "acc.mean" matched by multiple actual arguments #56

Closed
sofiakje opened this issue Sep 21, 2021 · 4 comments
Closed

formal argument "acc.mean" matched by multiple actual arguments #56

sofiakje opened this issue Sep 21, 2021 · 4 comments

Comments

@sofiakje
Copy link

Hi Nick,

I want to build an age-depth model for a sediment core with changing sedimentation rate. I try adding a boundary and assign the core different accumulation priors above and below the boundary, but it doesn't work. I can add the boundary, but not set different acc.mean for the different stratigraphic units.

This is the code I run:
D = runBacon(D,d.min=0,d.max=196,rotate.axes=TRUE,boundary=26,acc.mean=c(20,50))

And this is the error I get:
Error in rbacon::Bacon(core = site.name, coredir = bacon.dir, thick = thick, :
formal argument "acc.mean" matched by multiple actual arguments

Any thoughts on what is going wrong?

Thanks!
Sofia

@CommonClimate
Copy link
Collaborator

CommonClimate commented Sep 21, 2021

Hi Sofia,
I'll take a stab at this even though I'm not the R programmer on the team... From the rbacon::Bacon() documentation, it seems that one way to get Bacon to recognize that there are changes in sedimentation rate is to specify a parameter called hiatus.depths, which the geoChronR API should allow you to pass to Bacon. Can you give that a try and see what happens? Otherwise I think the method expects just one value for acc.mean, hence why it complains hen you give 2.
Julien

@nickmckay
Copy link
Owner

A bit more on this, and sorry to make Julien wade in a bit here. Most bacon parameters can be passed directly through runBacon to bacon, but acc.mean is one of the exceptions because of some additional work that geoChronR does. So to set acc.mean, use the parameter bacon.acc.mean = c(20,50). You should be ok with two values there.

The other parameter that works like this is the thick parameter, for which you'd need bacon.thick. Complete details of the parameters are available in the help, or documentation, which is here

@CommonClimate
Copy link
Collaborator

Yes, what he said !

@sofiakje
Copy link
Author

Yes, that worked perfectly! Good to know about the exceptions - I'll remember that for next time I run into similar problems. Thank you!

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

3 participants