[R] (no subject)

Gabor Grothendieck ggrothendieck at myway.com
Tue Sep 28 15:56:48 CEST 2004


YiYao_Jiang <YiYao_Jiang <at> smics.com> writes:

: 
: ******************************
: Could you perhaps describe exactly what "can't compile" means, please?
: It's hard to know what you've tried without a little more information.
: ******************************
: 
: 1). I type these command:
: 
:          f <- function(x,y) x+y
:          g <- function(x,y) x-y
:          d <- data.frame(a=1,b=2)
:          e <- rnorm(1000)
:          package.skeleton(list=c("f","g","d","e"), name="AnExample")
: 
: This is an example in "package.skeleton" . And I find a new 
folder "AnExample" created in "D:\ R\ rw109\ ".
: Enter the  "AnExample" folder , there are 4 folders "data", "mam", "R","src" 
and 2 files "DESCRIPTION" and
: "README". 
: 
: 2). I type "> search()" but no "AnExample". What should I do to setup the 
package?

Try these 3 steps (assuming Windows 1.9.1 patched):

1. In R,
	f <- function(x,y) x+y
	g <- function(x,y) x-y
	d <- data.frame(a=1,b=2)
	e <- rnorm(1000)
	package.skeleton(list=c("f","g","d","e"), name="AnExample")
	# optionally edit DESCRIPTION file and help files

2. In command line:
	cd \Program Files\R\rw1091pat
	bin\R CMD build anExample
	bin\R CMD check anExample
	bin\R CMD build anExample --binary
        # at this point you should have AnExample_1.0.zip 

3. In R,
	install.packages("AnExample_1.0.zip", CRAN = NULL) 
	library(anExample)
	f(1,2)




More information about the R-help mailing list