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

Error with sessionInfo version #258

Closed
03rcooke opened this issue Mar 21, 2024 · 0 comments
Closed

Error with sessionInfo version #258

03rcooke opened this issue Mar 21, 2024 · 0 comments
Assignees

Comments

@03rcooke
Copy link
Contributor

03rcooke commented Mar 21, 2024

This is relevant to code within occDetFunc().

I think they have changed the structure returned by sessionInfo() in more recent versions of R.

So the current code session.info <- sessionInfo() packages <- c(sapply(session.info[7][[1]], function(x) x$Version), sapply(session.info[8][[1]], function(x) x$Version)) returns the error Error in x$Version : $ operator is invalid for atomic vectors.

I think we need to be explicit with the objects within sessionInfo and that should help if they change the order. This code works and doesn't produce an error session.info <- sessionInfo() packages <- c(sapply(session.info$otherPkgs, function(x) x$Version), sapply(session.info$loadedOnly, function(x) x$Version))

Else we could use the base function, packageVersion("sparta")

@03rcooke 03rcooke self-assigned this Mar 21, 2024
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