I am creating my own R package which depends on a function defined in R-package named fOption. My NAMESPACE file has a line:
import(fOptions)
My DESCRIPTION file has a line:
Depends: fOptions
However, when I compile my R package using R CMD CHECL --as-cran option from the terminal, I get the following warning messages:
Found the following significant warnings:
Warning: package ‘timeDate’ was built under R version 3.1.2
Warning: package ‘timeSeries’ was built under R version 3.1.2
Warning: package ‘fBasics’ was built under R version 3.1.2
I found that these are dependencies of fOptions as its description file says:
Depends: methods, timeDate, timeSeries, fBasics
Does this mean that I cannot create my R package that depend on this particular R package (fOption)?
I am using OS X Version 10.9.4 and My R version is 3.1.1 (2014-07-10) -- "Sock it to Me".
Those are warnings, not errors, which means you can proceed but it's better if you address them.
In this case, you're getting the warnings because a few of the packages you need were built using an R version that is newer than the R version you are running. This can potentially be a problem, though it's likely not a problem, hence it's just a warning. If any of those packages have a different behaviour in the newer R version, for example, this would be critical, though that's likely not the case.
I would suggest updating your R version to 3.1.2, and that would get rid of these warnings plus you'll have a newer R version :) If you are working in an environment where you cannot update R, then it's fine, you can go on with your package with these warnings, it's just non-ideal.
My R was an environment within Anaconda - I was able to avoid this error by updating R as follows:
Open Anaconda Command line (this takes you to the base environment)
(base) C:\Users\grant>
Find the path to your R environment by running the following command:
(base) C:\Users\grant>conda envs
output:
# conda environments:
#
base * C:\Users\grant\Anaconda3
Python2p7 C:\Users\grant\Anaconda3\envs\Python2p7
R C:\Users\grant\Anaconda3\envs\R
rstudio C:\Users\grant\Anaconda3\envs\rstudio
Using the above path - activate your R environment:
(base) C:\Users\grant>activate C:\Users\grant\Anaconda3\envs\R
Now that your R environment is active - you can update your version of R as follows:
(R) C:\Users\grant>conda update r-caret
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With