Hi, I never acutally made a package before. I have a folder, say called "john" that has everything it needs to be in a R package. Some instruction says I need Rtools from R mirror site. I installed the Rtools, but under DOS, the command "Rcmd" is still not recognized. Any suggestions? Thanks John
On Fri, Feb 3, 2012 at 11:25 AM, ql16717 <ql16717 at gmail.com> wrote:> Hi, > > I never acutally made a package before. I have a folder, say called > "john" that has everything it needs to be in a R package. Some > instruction says I need Rtools from R mirror site. I installed the > Rtools, but under DOS, the command "Rcmd" is still not recognized. > > Any suggestions? Thanks > JohnI don't have an answer to your question, but have you read through: http://cran.r-project.org/doc/contrib/Leisch-CreatingPackages.pdf or ?package.skeleton Those resources might be able to help. James
You do not have the path to the R binary set in your operating systems (obviously Windows, although unstated) PATH environment variable. This is explained in so many places, including the R Installation and Administration manual ... Uwe Ligges On 03.02.2012 18:25, ql16717 wrote:> Hi, > > I never acutally made a package before. I have a folder, say called > "john" that has everything it needs to be in a R package. Some > instruction says I need Rtools from R mirror site. I installed the > Rtools, but under DOS, the command "Rcmd" is still not recognized. > > Any suggestions? Thanks > John > > ______________________________________________ > R-help at 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.
On Fri, Feb 3, 2012 at 12:25 PM, ql16717 <ql16717 at gmail.com> wrote:> Hi, > > I never acutally made a package before. I have a folder, say called > "john" that has everything it needs to be in a R package. Some > instruction says I need Rtools from R mirror site. I installed the > Rtools, but under DOS, the command "Rcmd" is still not recognized. > > Any suggestions? Thanks > JohnRun this R command to find out where Rcmd.exe is on your system: list.files("Rcmd.exe", path = R.home(), recursive = TRUE, full = TRUE) and if its in \x\y\z\Rcmd.exe then: 1. this will run Rcmd.exe "\x\y\z\Rcmd.exe" ...whatever... 2. or put \x\y\z on your windows path The above two methods have two deficiencies: The first one requires that you enter the path every time you run Rcmd and the second one requires that you modify your system's path. Also both procedures change every time you install a new version of R since the location of R will normally change. The following overcomes these disadvantages: 3. or put Rcmd.bat from http://batchfiles.googlecode.com anywhere on your path (i.e. enter this command path into the Windows console and put Rcmd.bat in any of the folders listed) and then start a new Windows command shell and issue: Rcmd ...whatever... That will run Rcmd.bat which will find your R installation from the registry and then it run Rcmd.exe. If you install a new version of R then it will automatically pick up the new version of R from the registry so there will be nothing to change. Rcmd.bat is a single self contained windows batch file. -- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com