R – Creating R package, Warning: package ‘—’ was built under R version 3.1.2


I am creating my own R package which depends on a function defined in R-package named fOption.
My NAMESPACE file has a line:


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".

Best Answer

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.