Skip to content

Create a samc-class object using the resistance and absorption data #18

Answered by andrewmarx
cliu229 asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for moving it here; it'll help others working with older code that encounter this issue.

Starting in version 1.4.0, some changes were made to the samc() function to make it easier to maintain and add new features. As of version 2.0.0, the old approach was permanently removed, which means some older code needs to be updated. Fortunately, it should be simple.

The parameters for the transition function now need to be grouped together into a list, and that list is then passed to the samc() function. For your code, it would look like this:

# Setup the details for our transition function
tr <- list(fun = function(x) 1/mean(x), # Function for calculating transition probabilities
         …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@cliu229
Comment options

Answer selected by cliu229
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants