You did not specify any object in the function. Thus R is building the package "test" with all the objects present in your session when you are calling the package.skeleton function. I suppose that one of these objects is causing problem. I suggest you list all the variables/function necessary for your package in the function.

Something like that :
a <- 1
b <- function(x) {x+x}
package.skeleton(name = "test", list=c("a","b"))

Eloi

On 12-05-08 10:00 AM, abhisarihan wrote:
I am a newbie in R, and I am trying to build an R package but I keep getting
an unexpected input error when I try using the build, check or install
commands. I used the following command to generate the skeleton:

package.skeleton("test")
After this I went to the command prompt and to the directory with the test
folder and ran the command:

R CMD build test
I got the following error message:

Error: 37:1: unexpected input
37:
      ^
I even tried the check and INSTALL commands on the package and got the same
error. I tried googling the error code and the error message but it seems
like I should not be getting such an error while building the package
itself. Everywhere I checked it seemed like simply typing that command in
command prompt should work. I am wondering if anyone knows what I am doing
wrong? Thanks for the help.

I am using R 2.15.0 on Windows 7.

--
View this message in context: 
http://r.789695.n4.nabble.com/Unexpected-input-while-building-package-in-R-tp4618065.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



--
Eloi Mercier
Bioinformatics PhD Student, UBC
Paul Pavlidis Lab
2185 East Mall
University of British Columbia
Vancouver BC V6T1Z4

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to