The following is log of R CMD check package error:
* using log directory 'C:/Users/erdogan/Documents/Revolution/causfinder.Rcheck'
* using R version 2.15.3 (2013-03-01)
* using platform: i386-w64-mingw32 (32-bit)
* using session charset: CP1254
* checking for file 'causfinder/DESCRIPTION' ... OK
* checking extension type ... Package
* this is package 'causfinder' version '1.0'
* checking package namespace information ... OK
* checking package dependencies ... ERROR
Packages required but not available:
'combinat' 'gtools' 'calibrate' 'scales'
See the information on DESCRIPTION files in the chapter 'Creating R packages' of the 'Writing R Extensions' manual.
In my description file, I have all the required files ('combinat' 'gtools' 'calibrate' 'scales') under "Depends:" heading.
What I did till now: I added the above packages under "Suggests:" as well.
Though that the error is sticky.
>.libPaths()
[1] "C:/Revolution/R-Enterprise-7.1/R-3.0.2/library"
I checked both within and outside R:
> devtools::check("C:/Revolution/R-Enterprise-7.1/R-3.0.2/library/causfinder")
From Command Prompt (Windows 7):
C:\Users\erdogan\Documents\Revolution>R CMD check causfinder
* using log directory 'C:/Users/erdogan/Documents/Revolution/causfinder.Rcheck'
* using R version 2.15.3 (2013-03-01)
* using platform: i386-w64-mingw32 (32-bit)
* using session charset: CP1254
* checking for file 'causfinder/DESCRIPTION' ... OK
* checking extension type ... Package
* this is package 'causfinder' version '1.0'
* checking package namespace information ... OK
* checking package dependencies ... ERROR
Packages required but not available:
'combinat' 'gtools' 'calibrate' 'scales'
See the information on DESCRIPTION files in the chapter 'Creating R
packages' of the 'Writing R Extensions' manual.
I also observed the following interesting situation: in the log file, R version is specified as 2.15.3; however, when I do the following, I got different R version!
> R.Version()
$platform
[1] "i386-w64-mingw32"
$version.string
[1] "R version **3.0.2** (2013-09-25)"
Any help will be greatly appreciated.
Related
I want to use arulessequences for sequence mining. I have to use it in Oracle R distribution version R 3.3.0 (last released) and The problem is that the last version of the arulesSequences package is R >= 3.3.2. So I get an error for this problem:
Error: this is R 3.3.0, package arulesSequences needs >=3.3.2
So I decided to compile the source code for older release. I downloaded an older package that needs R 3.2.5 or above. And I know that this package is depended to arules. so I have installed it already. I used following instructions to compile the arulessequences package:
in the source directory I run this command:
R CMD build arulesSequences
the output of this command is:
c:\rr\arulesSequences_0.2-17>R CMD build arulesSequences
* checking for file 'arulesSequences/DESCRIPTION' ... OK
* preparing 'arulesSequences':
* checking DESCRIPTION meta-information ... OK
* cleaning src Warning in cleanup_pkg(pkgdir, Log) : unable to run 'make clean' in 'src'
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* looking to see if a 'data/datalist' file should be added
* building 'arulesSequences_0.2-17.tar.gz'
a file named 'arulesSequences_0.2-17.tar.gz' get created but when I check it as below I get the following as output:
c:\rr\arulesSequences_0.2-17\arulesSequences>R CMD check arulesSequences
* using log directory 'c:/rr/arulesSequences_0.2-17/arulesSequences/arulesSequences.Rcheck'
using R version 3.4.0 (2017-04-21)
using platform: x86_64-w64-mingw32 (64-bit)
using session charset: ISO8859-1
checking for file 'arulesSequences/DESCRIPTION' ... OK
this is package 'arulesSequences' version '0.2-17'
checking package namespace information ... OK
checking package dependencies ... ERROR Package required but not available: 'arules'
See section 'The DESCRIPTION file' in the 'Writing R Extensions'
manual.
* DONE Status: 1 ERROR
I know the arules package is installed and I checked it. It seems the build process is not successful. do you have any idea to help solve this out?
You have to first install c/c++ compiler for R(called gcc) that is under R's additional build tools.
to do that, in RStudio goto File->New File ->c++ File.
It will show the following dialogue:
Then click on yes.
to compile a package under windows, you have to set repo to Null and type to source.
you can use this command to do that:
install.packages("SOURCEADDRESS",type="source",repo=null)
as #EugèneAdell mentioned above you have to first install arules. then arulessequences.
Instead of building, take the archive packages that seem to be ok for your R version and install them. On my Linux, this gives :
wget http://cran.univ-paris1.fr/src/contrib/Archive/arules/arules_1.5-0.tar.gz
R CMD INSTALL $HOME/arules_1.5-0.tar.gz
* installing to library ‘/home/ruser/R-3.2.5/lib64/R/library’
* installing *source* package ‘arules’ ...
...
** testing if installed package can be loaded
* DONE (arules)
wget http://cran.univ-paris1.fr/src/contrib/Archive/arulesSequences/arulesSequences_0.2-17.tar.gz
R CMD INSTALL $HOME/arulesSequences_0.2-17.tar.gz
* installing to library ‘/home/ruser/R-3.2.5/lib64/R/library’
* installing *source* package ‘arulesSequences’ ...
...
** testing if installed package can be loaded
* DONE (arulesSequences)
R
> library(arulesSequences)
Loading required package: arules
Loading required package: Matrix
Attaching package: ‘arules’
Maybe a more recent version for arules is possible, I just took the first one from the 1.5 series.
I am using Rstudio-version 0.99.902 and R-version 3.3.1 (2016-06-21).
I have written a package that I would like to submit to CRAN. When I run the devtools::check() functions (--as-cran included), I successfully pass all tests, with NO errors/warnings/notes.
Although when I run the same on my terminal (ubuntu 15.10), it gives me errors and warnings.
Running R CMD build -
R CMD build mypackage
//home/akilesh/anaconda2/bin/R: 12: [: Linux: unexpected operator
/home/akilesh/anaconda2/lib/R/bin/R: 12: [: Linux: unexpected operator
* checking for file ‘mypackage/DESCRIPTION’ ... OK
* preparing ‘mypackage’:
* checking DESCRIPTION meta-information ... OK
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* building ‘mypackage_0.1.0.tar.gz’
Running R CMD check -
R CMD check mypackages_0.1.0.tar.gz
/home/akilesh/anaconda2/bin/R: 12: [: Linux: unexpected operator
/home/akilesh/anaconda2/lib/R/bin/R: 12: [: Linux: unexpected operator
* using log directory '/home/akilesh/Desktop/CRAN/final/mypackage.Rcheck'
* using R version 3.3.1 (2016-06-21)
* using platform: x86_64-pc-linux-gnu (64-bit)
* using session charset: UTF-8
* checking for file ‘mypackage/DESCRIPTION’ ... OK
* checking extension type ... Package
* this is package ‘mypackage’ version ‘0.1.0’
* package encoding: UTF-8
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘mypackage’ can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking DESCRIPTION meta-information ... ERROR
/home/akilesh/anaconda2/lib/R/bin/R: 12: [: Linux: unexpected operator
* DONE
Status: 1 ERROR
See
‘/home/akilesh/Desktop/CRAN/final/mypackage.Rcheck/00check.log’
for details.
This is my DESCRIPTION file
Package: mypackage
Type: Package
Title: package title
Version: 0.1.0
Author: Akilesh [aut,cr]
Maintainer: Akilesh <myemailid#gmail.com>
Description: My package description.
License: GPL-2
LazyData: FALSE
Imports:
rvest,dplyr,httr,stringr,jsonlite,glue,xml2
Suggests:
knitr
RoxygenNote: 6.0.1
Encoding: UTF-8
I am unable to understand why this is happening. Can I still submit my package to CRAN, since it passes the tests while running on Rstudio, devtools::check()? And while it passes all test while running on Rstudio, why isn't it passing the tests on the terminal? Does it have something to do with installing Conda?
What is the significance of the /home/akilesh/anaconda2/lib/R/bin/R: 12: [: Linux: unexpected operator error?
UPDATE: Added the minimum version numbers for R, and all Imports as well. In vain.
I am checking my R package for CRAN submission, but there is one NOTE that I cannot get rid of. I googled it but seems this NOTE is not common thus I didn't find much useful information. Could any one provide me with a solution? Below is part of the output from R CMD check --as-cran.
* using R version 3.2.0 (2015-04-16)
* using platform: x86_64-apple-darwin13.4.0 (64-bit)
* using session charset: UTF-8
* using option ‘--as-cran’
...
...
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... NOTE
File README.md cannot be checked without ‘pandoc’ being installed.
* checking for left-over files ... OK
* checking index information ... OK
You can install pandoc from within R using install.pandoc() from the installr package.
I am writing a new extension for R. I have loaded all my functions into the Global Environment and ran
package.skeleton('package_name')
in the NAMESPACE file I have added all the required packages:
import(PerformanceAnalytics)
import(fBasics)
import(splines)
import(quantmod)
and added a LazyData:yes option to the DESCRIPTION file.
When I R CMD INSTALL package_name it goes without errors, only with several warnings:
When I run the package check I get
* using log directory 'folder path here'
* using R version 2.15.0 (2012-03-30)
* using platform: i386-pc-mingw32 (32-bit)
* using session charset: ISO8859-1
* checking for file 'package_name/DESCRIPTION' ... OK
* checking extension type ... Package
* this is package 'package_name' version '1.0'
* checking package namespace information ... OK
* checking package dependencies ... ERROR
Namespace dependencies not required:
'PerformanceAnalytics' 'fBasics' 'quantmod'
See the information on DESCRIPTION files in the chapter 'Creating R
packages' of the 'Writing R Extensions' manual.
In the R session typing library(package_name) all is being loaded without errors (few warnings with the naming conventions) but I cannot see any of the functions. What could possible cause that? When I do all the above with the tutorial example everything works fine. No S3 or S4 is being used - just plain R functions
Thanks,
Vladimir
this has now been bugging me for a while now and I can't make other related pieces of advice fit to my problem. Yes, i have perused the net for help.
Problemstatement:
I have written a package with all the basic requirements to make a first build.
However, I have two dependecies (functions from other packages) which seemingly can't be loaded.
==> Rcmd.exe build mypackage
[...]
* using log directory 'mydirectory/mypackage.Rcheck'
* using R version 2.15.2 (2012-10-26)
* using platform: x86_64-w64-mingw32 (64-bit)
* using session charset: ISO8859-1
* checking for file 'mypackagel/DESCRIPTION' ... OK
* checking extension type ... Package
* this is package 'mypackage' version '0.01'
* checking package namespace information ... OK
* checking package dependencies ... ERROR
Package required but not available: 'otherpackage'
Exited with status 1.
Now I am using RStudio to do the package building. However, it seems I cannot make it find the 'otherpackage'. Where do I set this under Windows/RStudio?
Anyone can give a quick hint, please?