-
Notifications
You must be signed in to change notification settings - Fork 40
Description
Let me try to explain what is the problem
Consider the following sequence of operations from the console:
> mkdir tmp
> cd tmp
> mkdir myPackage
After that, it is obvious that tmp
contains only the myPackage
folder and the myPackage
folder is empty
Now I want to create a new R package inside the myPackage
folder
Now consider 2 cases:
-
The
pkgKitten
package is not installed on the current interpreter
I run following code> R -q -e "RcppEigen::RcppEigen.package.skeleton('myPackage', force = T)"
and get the next one output
Calling package.skeleton to create basic package.
Creating directories ...
Creating DESCRIPTION ...
Creating NAMESPACE ...
Creating Read-and-delete-me ...
Saving functions and data ...
Making help files ...
Done.
Further steps are described in './myPackage/Read-and-delete-me'.Adding RcppEigen settings
>> added Imports: Rcpp, RcppEigen
>> added LinkingTo: Rcpp, RcppEigen
>> added useDynLib and importFrom directives to NAMESPACE
>> added Makevars file with RcppEigen settings
>> added Makevars.win file with RcppEigen settings
>> added example src file using Eigen classes
>> added example Rd file for using Eigen classes
>> invoked Rcpp::compileAttributes to create wrappersLet's look inside the
myPackage
folder> ls myPackage/ DESCRIPTION man NAMESPACE R Read-and-delete-me src
Great! The package was created
-
The
pkgKitten
package is installed on the current interpreter now
Let's try> R -q -e "RcppEigen::RcppEigen.package.skeleton('myPackage', force = T)"
Calling kitten to create basic package.
Error: Directory 'myPackage' already exists. Aborting.Oops, error. And the directory is of course empty.
I think this behavior is unacceptable. It depends on some external factors. Are you sure you want to use the pkgKitten
package? Or maybe you should give the user a choice whether to use it? The directory where I want to create the package may be not empty. I would like to be able to create a package without first deleting pkgKitten
every time. Thanks