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

setMisc and getMisc functions do not exist in the latest version (1.6.0) #204

Open
metwallys opened this issue Oct 10, 2024 · 2 comments
Open

Comments

@metwallys
Copy link

metwallys commented Oct 10, 2024

I was working on week 5 of the course and found out that these two functions used to store additional information no longer exist in the latest version without an alternative. I am not able to reproduce the animal breeding program scripts, maybe unless I explicitly install and use the older version of AlphaSimR.

I wanted to know If this is going to be the case from now on to look for alternative methods to store similar information in the future. Thank you in advance!

UPDATE:
It took me a while to read and understand the flipping that happened to misc organisation. However I was able to achieve the same results in the course this way.

AlphaSimR older versions:

Assign year of birth for the founders

year = 0
founders = setMisc(x = founders,
node = "yearOfBirth",
value = year)
head(getMisc(x = founders, node = "yearOfBirth"))

AlphaSimR v1.6.0:

Assign year of birth for the founders

year = 0

founders@misc$yearOfBirth = rep(year, nInd(founders))
head(founders@misc$yearOfBirth)

@gregorgorjanc
Copy link
Contributor

@metwallys indeed, we have removed setMisc() and getMisc() in 1.6 since the old approach was tricky to use and very slow. You are now using it correctly!

We are aware that we must update MOOC - the edX platform still uses the older version of AlphaSimR so it still works in the platform.

@gaynorr Maybe we should have added a deprecation message for setMisc() and getMisc()? Happy to do that if you agree!

@metwallys
Copy link
Author

@gregorgorjanc thank you very much for your prompt response!

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

2 participants