Creating R package, Warning: package ‘---’ was built under R version 3.1.2
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