[R] An easy question on package building/installation
Jeff Newmiller
jdnewmil at dcn.davis.CA.us
Wed Mar 18 13:50:35 CET 2015
You appear to be entering that command at the R prompt when it is intended to be entered at the operating system command line. There is a whole document "Writing R Extensions" that you really should be reading no matter what IDE you are using.
Also, details of using RStudio are off topic here, but there is a button/menu item that will execute these commands for you in the GUI of that program.
---------------------------------------------------------------------------
Jeff Newmiller The ..... ..... Go Live...
DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded Controllers) .OO#. .OO#. rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.
On March 18, 2015 1:01:18 AM PDT, jpm miao <miaojpm at gmail.com> wrote:
>Hi,
>
> I try to build a package myself on RStudio. The command
>"package.skeleton" is successfully run, but the command "build" is not.
>In
>my case, the username and the package name are both "abcd".
>
> Error message:
>
>> R CMD build abcd
>
>Error: unexpected symbol in "R CMD"
>
>>
>
> Could someone help me to write a correct "build" command?
>
> Thanks! Full log:
>
>
>> setwd("D:/0B/R/pkg-abcd")
>
>> setwd("D:/0B/R/pkg-abcd")
>
>> package.skeleton(name="abcd")
>
>Creating directories ...
>
>Creating DESCRIPTION ...
>
>Creating NAMESPACE ...
>
>Creating Read-and-delete-me ...
>
>Saving functions and data ...
>
>Making help files ...
>
>Done.
>
>Further steps are described in './abcd/Read-and-delete-me'.
>
> > setwd("D:/0B/R/pkg-abcd/abcd")
>
>> dir()
>
>[1] "data" "DESCRIPTION" "man"
>
>[4] "NAMESPACE" "R" "Read-and-delete-me"
>
>>
>
>
>
>> .libPaths()
>
>[1] "C:/Users/abcd/Documents/R/win-library/3.0"
>
>[2] "C:/Program Files/R/R-3.0.1/library"
>
>>
>
>
>
>> R CMD build abcd
>
>Error: unexpected symbol in "R CMD"
>
>> R CMD build C:\Users\abcd\Documents\R\win-library\3.0
>
>Error: unexpected symbol in "R CMD"
>
>> R CMD INSTALL -1 C:/Users/abcd/Documents/R/win-library/3.0 abcd
>
>Error: unexpected symbol in "R CMD
>
> [[alternative HTML version deleted]]
>
>______________________________________________
>R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>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.
More information about the R-help
mailing list