******************************
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?
Thanks.
Best Regards
YiYao Jiang
Product Division/ product Testing Department
Semiconductor Manufacturing International Corporation
18 ZhangJiang Road, PuDong New Area, Shanghai ZIP: 201203
Tel:86-21-5080-2000 Ext. 15173
YiYao_Jiang wrote:> ****************************** > 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? > > Thanks.As you already have been asked: Please read the manual "Writing R Extensions"! It's in there! Also read the content of the file .../src/gnuwin32/readme.packages how to setup an appropriate environment (since you are on Windows, what you have not told us before). Uwe Ligges> > Best Regards > > YiYao Jiang > > Product Division/ product Testing Department > Semiconductor Manufacturing International Corporation > 18 ZhangJiang Road, PuDong New Area, Shanghai ZIP: 201203 > Tel:86-21-5080-2000 Ext. 15173 > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
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)