[R] R package development in windows

Christos Hatzis christos at nuverabio.com
Fri May 4 16:14:14 CEST 2007


After cleaning up your workspace to keep only the objects that you will need
to have in your "package", you can save it as MyStuff.RData

save(list=ls(), file=file.path(my.package.dir, "MyStuff.RData"))

To use this "package" in future sessions all you need is

attach(file.path(my.package.dir, "MyStuff.RData"))

This will make your objects available in your current session without
cluttering your workspace.
Of course, there is a price to pay for simplicity (i.e. no error checks, no
documentation etc).

-Christos 

Christos Hatzis, Ph.D.
Nuvera Biosciences, Inc.
400 West Cummings Park
Suite 5350
Woburn, MA 01801
Tel: 781-938-3830
www.nuverabio.com
 


> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch 
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Lucke, Joseph F
> Sent: Friday, May 04, 2007 10:03 AM
> To: Doran, Harold; Duncan Murdoch
> Cc: r-help at stat.math.ethz.ch
> Subject: Re: [R] R package development in windows
> 
> Might there be an (semi-)automated procedure to create a 
> minimal, personal package, for my eyes only, that I can load 
> with a "libray(MyStuff)" command?  This would be preferable 
> to having to
> source() the files.  Is there already such a procedure?
> Joe
> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Doran, Harold
> Sent: Thursday, May 03, 2007 2:33 PM
> To: Duncan Murdoch
> Cc: r-help at stat.math.ethz.ch
> Subject: Re: [R] [SPAM] - Re: R package development in 
> windows - BayesianFilter detected spam
> 
> Thanks, Duncan. I'll look into that. Is there an 
> authoritative document that codifies the new package 
> development procedures for 2.5.0 (windows-specific), or is 
> that Writing R Extensions? In this thread alone I've received 
> multiple emails pointing to multiple web sites with 
> instructions for windows. Inasmuch as its appreciated, I'm a 
> bit confused as to which I should consider authoritative.
> 
> I do hope I can resolve this and appreciate the help I've received.
> However, I feel a bit compelled to note how very difficult 
> this process is. 
> 
> Harold
> 
> 
> > -----Original Message-----
> > From: Duncan Murdoch [mailto:murdoch at stats.uwo.ca]
> > Sent: Thursday, May 03, 2007 3:24 PM
> > To: Doran, Harold
> > Cc: Gabor Grothendieck; r-help at stat.math.ethz.ch
> > Subject: [SPAM] - Re: [R] R package development in windows 
> - Bayesian 
> > Filter detected spam
> > 
> > On 5/3/2007 3:04 PM, Doran, Harold wrote:
> > > Thanks Gabor, Sundar, and Tony. Indeed, Rtools was 
> missing from the 
> > > path. With that resolved, and another 10 minute windows
> > restart, I get
> > > the following below. The log suggests that hhc is not 
> installed. It 
> > > is, and, according to the directions I am following, I have
> > placed it
> > > in the c:\cygwin directory.
> > 
> > I think the problem is that you are following a real mix of 
> > instructions, and they don't make sense.
> > 
> > It would be nice if folks would submit patches to the R 
> Admin manual 
> > (or to the Rtools web site) rather than putting together web sites 
> > with advice that is bad from day one, and quickly gets 
> worse when it 
> > is not updated.
> > 
> > > BTW, package.skeleton() doesn't seem to create the correct
> > DESCRIPTION
> > > template. I had to add the DEPENDS line. Without this, I
> > get another
> > > error.
> > > 
> > > 
> > > C:\Program Files\R\R-2.4.1\bin>Rcmd build --force --binary g:\foo
> > 
> > R 2.4.1 is no longer current; the package building 
> instructions in R 
> > 2.5.0 have been simplified a bit.  You might want to try those.
> > 
> > Duncan Murdoch
> > 
> > > * checking for file 'g:\foo/DESCRIPTION' ... OK
> > > * preparing 'g:\foo':
> > > * checking DESCRIPTION meta-information ... OK
> > > * removing junk files
> > > * checking for LF line-endings in source files
> > > * checking for empty or unneeded directories
> > > * building binary distribution
> > >  WARNING
> > > * some HTML links may not be found
> > > installing R.css in c:/TEMP/Rinst40061099
> > > 
> > > Using auto-selected zip options ''
> > > latex: not found
> > > latex: not found
> > > latex: not found
> > > 
> > > ---------- Making package foo ------------
> > > latex: not found
> > >   adding build stamp to DESCRIPTION
> > > latex: not found
> > > latex: not found
> > > latex: not found
> > >   installing R files
> > > latex: not found
> > >   installing data files
> > > latex: not found
> > >   installing man source files
> > >   installing indices
> > > latex: not found
> > >   not zipping data
> > >   installing help
> > > Warning: \alias{foo} already in foo-package.Rd -- skipping
> > the one in
> > > foo.Rd  >>> Building/Updating help pages for package 'foo'
> > >      Formats: text html latex example chm
> > >   foo-package                       text    html    latex   
> > example chm
> > >   foo                               text    html    latex   
> > example chm
> > >   mydata                            text    html    latex   
> > example chm
> > > hhc: not found
> > > cp: cannot stat `c:/TEMP/Rbuild40048815/foo/chm/foo.chm': 
> > No such file
> > > or direct ory
> > > make[1]: *** [chm-foo] Error 1
> > > make: *** [pkg-foo] Error 2
> > > *** Installation of foo failed ***
> > > 
> > > Removing 'c:/TEMP/Rinst40061099/foo'
> > >  ERROR
> > > * installation failed
> > > 
> > > 
> > > C:\Program Files\R\R-2.4.1\bin>
> > > 
> > >> -----Original Message-----
> > >> From: Gabor Grothendieck [mailto:ggrothendieck at gmail.com]
> > >> Sent: Thursday, May 03, 2007 2:50 PM
> > >> To: Doran, Harold
> > >> Cc: r-help at stat.math.ethz.ch
> > >> Subject: Re: [R] R package development in windows
> > >> 
> > >> It can find sh.exe so you haven't installed Rtools.
> > >> 
> > >> There are several HowTo's listed in the links section here that 
> > >> include pointers to R manuals and other step by step
> > >> instructions:
> > >> 
> > >> http://code.google.com/p/batchfiles/
> > >> 
> > >> On 5/3/07, Doran, Harold <HDoran at air.org> wrote:
> > >> > I'm attempting to build an R package for distribution and
> > >> am working
> > >> > from the directions found at
> > >> > 
> > >> 
> > 
> http://www.maths.bris.ac.uk/~maman/computerstuff/Rhelp/Rpackages.html
> > >> #
> > >> > Wi
> > >> > n-Win
> > >> >
> > >> > I've read through Writing R Extensions and various other
> > >> "helpful" web
> > >> > sites. I've installed all relevant software (perl,
> > cygwin, mingwin,
> > >> > hhc.exe). Here is what I have done so far:
> > >> >
> > >> > 1) Sourced data and functions into R
> > >> > 2) Used package.skeleton
> > >> > 3) Edited Description file
> > >> > 4) Edited my windows path to ensure the new programs (e.g.,
> > >> perl) are
> > >> > in the path
> > >> > 5) Then, I open DOS and do the following in the script below
> > >> >
> > >> > C:\Program Files\R\R-2.4.1\bin>Rcmd build  --force
> > --binary g:\foo
> > >> > * checking for file 'g:\foo/DESCRIPTION' ... OK
> > >> > * preparing 'g:\foo':
> > >> > * checking DESCRIPTION meta-information ...'sh' is not
> > >> recognized as
> > >> > an internal  or external command, operable program or 
> batch file.
> > >> >  OK
> > >> > * removing junk files
> > >> > 'sh' is not recognized as an internal or external
> > command, operable
> > >> > program or batch file.
> > >> > 'sh' is not recognized as an internal or external
> > command, operable
> > >> > program or batch file.
> > >> > 'sh' is not recognized as an internal or external
> > command, operable
> > >> > program or batch file.
> > >> > Error: cannot open file 'foo/DESCRIPTION' for reading
> > >> >
> > >> > I'ver read through about as much documentation as I can
> > >> find, and I'm
> > >> > just not sure what I should do from here. I admit that I
> > >> have reached
> > >> > a point of frustration and must apologize if the problem
> > would be
> > >> > evident if I read documentation further, but I'm about
> > tapped out
> > >> > after a few days of experimentation.
> > >> >
> > >> > Can anyone suggest how I could resolve this and what the
> > next steps
> > >> > would be?
> > >> >
> > >> > Thanks:
> > >> >
> > >> > I'm using Windows XP and R 2.4.1
> > >> >
> > >> > Harold
> > >> >
> > >> >        [[alternative HTML version deleted]]
> > >> >
> > >> > ______________________________________________
> > >> > 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
> > >> > and provide commented, minimal, self-contained,
> > reproducible code.
> > >> >
> > >>
> > > 
> > > ______________________________________________
> > > 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
> > > and provide commented, minimal, self-contained, reproducible code.
> > 
> >
> 
> ______________________________________________
> 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
> and provide commented, minimal, self-contained, reproducible code.
> 
> ______________________________________________
> 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
> and provide commented, minimal, self-contained, reproducible code.
> 
>



More information about the R-help mailing list