[R] package.skeleton() does not create 'data' folder

Nipesh Bajaj bajaj141003 at gmail.com
Wed Jun 8 17:10:03 CEST 2011


Hi again, I was using package.skeleton() function to create the
skeleton of my package in windows. Here is my attempt:

rm(list = ls())
setwd("F:/R_PackageBuild")
package.skeleton("trial1", namespace = TRUE, code_files =
"F:/R_PackageBuild/trial.r")

In the trial.r file, there are 2 objects, one is a function and
another is data. Here they are:

fn1 <- Vectorize(function(x,y,z) {
			return(x + y +z)
		}, SIMPLIFY = TRUE)
Data <- rnorm(20)

However my problem is that package.skeleton() does not create any data
folder in the skeleton tree. However in the man folder there are 3 Rd
files (as expected), naming:
Data, fn1, trial1-package

However on the contrary if my code is like below then,
package.skeleton() creates data folder.
> fn1 <- Vectorize(function(x,y,z) {
+ return(x + y +z)
+ }, SIMPLIFY = TRUE)
> Data <- rnorm(20)
>
> setwd("F:/R_PackageBuild")
> package.skeleton("trial2")

So is it that if I use 'code_files ' argument then, R would not create
data folder?

Can somebody help me what I am missing in this process? Till now, I
create manually the data folder and within that folder manually put a
RData file where only object is that 'Data'. However I believe there
must be more elegant way to doing that.

While searching over net to settle this issue, I found this thread
'http://r.789695.n4.nabble.com/How-to-create-rda-file-to-be-used-in-package-building-td828148.html'
however this is answering my question.

Thanks,



More information about the R-help mailing list