[R SDK] document minimum version of R required (and check at runtime)
library(ArvadosR) packageVersion("ArvadosR") arv <- Arvados$new("api-token-redacted", "e51c5.arvadosapi.com", numRetries = 3) previous_collection <- Collection$new(arv, "e51c5-4zz18-ko243dg1k5c6hid") message("accessed previous collection") previous_collection$getFileListing() file_to_be_transferred <- previous_collection$get("foo")
bcosc@shell:~$ Rscript test-copy.R
accessed previous collection
Error in trimFromStart(relativePath, "./") :
could not find function "startsWith"
Calls: <Anonymous> -> <Anonymous> -> trimFromStart
#2 Updated by Tom Morris over 2 years ago
- Subject changed from R SDK collection$get errors with 'could not find function "startsWith"' to [R SDK] document minimum version of R required (and check at runtime)
- Assigned To set to Fuad Muhic
- Target version set to To Be Groomed
The startsWith method was new in R 3.3.0, so our use of it makes that the minimum R version.
We need to document that minimum and check at run time using getRVersion() or R.version$minor to make sure that our minimum is met.
Bioconductor requires the current R release (3.5 today), so that will become the requirement going forward when we're in Bioconductor.
#5 Updated by Fuad Muhic over 2 years ago
- Status changed from New to In Progress
Users running R version less than 3.3.0 (for now) will get a warning message every time they try to load the package. Package will still load, however. I don't think we can prevent package from loading if version is less than required (I'm not sure if that's what we want anyway). You can test this feature by bumping minAllowedRVersion to "3.6.0" in file "sdk/R/R/zzz.R" on line 3. I also added a note in README file.