Re: [Bioc-devel] package download statistics

2013-04-20 Thread Robert M. Flight
Sweet Dan, that is good to know. I realize of course you would only have
stats for the Bioconductor.org server. That is still pretty useful.

-Robert


On Fri, Apr 19, 2013 at 1:42 PM, Dan Tenenbaum dtene...@fhcrc.org wrote:

 On Fri, Apr 19, 2013 at 8:51 AM, Robert M. Flight rfligh...@gmail.com
 wrote:
  Is there any central, web-accessible location for the download statistics
  for all of the Bioconductor packages? I know each packages web-page has a
  link to a page with all of the download statistics, but was wondering if
  there was an easy way to get access to all of the statistics for given
  packages.
 

 There is this page:
 http://bioconductor.org/packages/stats/

 All packages are listed here with the number of downloads for each in
 the last 12 months.

 One thing to bear in mind is that the stats we compile are only from
 downloads on bioconductor.org; we don't have access to the web server
 logs of other mirrors.

 Dan


  The reason is alt-metrics. I thought it would be cool to have a little R
  package that takes a supplied Bioconductor package name, and compares its
  download statistics to the download statistics for all the other
  Bioconductor packages, essentially providing a percentile ranking.
 
  Cheers,
 
  -Robert
 
  Robert M Flight, PhD
  Bioinformatics PostDoctoral Scholar
  Center for Regulatory  Environmental Analytical Metabolomics (CREAM)
  Department of Chemistry
  Rm 309, Chemistry Building
  University of Louisville
  2320 South Brook Street
  Louisville, KY  40292
 
  PH 502-509-1827
  EM robert.fli...@louisville.edu
  EM rfligh...@gmail.com
  robertmflight.blogspot.com
 
  The most exciting phrase to hear in science, the one that heralds new
  discoveries, is not Eureka! (I found it!) but That's funny ... -
 Isaac
  Asimov
 
  [[alternative HTML version deleted]]
 
  ___
  Bioc-devel@r-project.org mailing list
  https://stat.ethz.ch/mailman/listinfo/bioc-devel


[[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


Re: [Rd] R 3.0, Rtools3.0,l Windows7 64-bit, and permission agony

2013-04-20 Thread Duncan Murdoch

On 13-04-19 10:03 PM, Gabor Grothendieck wrote:

On Fri, Apr 19, 2013 at 8:47 PM, Duncan Murdoch
murdoch.dun...@gmail.com wrote:

On 13-04-19 5:37 PM, Kevin Coombes wrote:


Having finally found some free time, I was going to use it to update a
bunch of R packages from 2.15 to 3.0.

I am running Windows 7, 64-bit professional.  This is on a brand-new
laptop using vanilla settings when installing the operating system.

Problem 1: I installed R3.0 to the default location (C:\Program
FIles\R\R-3.0.0).  The first thing I tried to do was install
BioConductor.  This failed (permission denied). Thinking that this might
be a BioConductor problem, I then tried to install a (semirandom)
package from CRAN.  This also failed.

In both cases, when using the GUI, the error message is almost
incomprehensible.  You get a pop-up window that *only* says Do you want
to use a private library instead?  Since this wasn't what I wanted to
do I said no.  Only after the pop-up closes does the command window
print the error message telling me that permission was denied for R to
write to its own library location.



This is a standard Windows problem, to stop viruses from modifying installed
programs.  The standard Windows solution to it is to run the installer as an
administrator, taking personal responsibility for installing the
package/virus.

Since this is a laptop, you could probably do this, but it's possible that
you are not the administrator on your system.  If that's the case, you
should ask your administrator to do the install.




Dumb Fix to Problem 1: So, I uninstalled R and then reinstalled to a
nonstandard location (C:\R\R-3.0.0).  Now I can successfully install
packages from CRAN and BioConductor (hooray!). But I run directly into:



That's another solution, and a third solution is to accept the offer R made,
to install your packages somewhere where you as a user have write
permission.




Problem 2: Emacs Speaks Statistics (ESS) can no longer find the R
binary. When R was installed in the default location, ESS worked. When R
2.15 (or earlier) was installed in the same nonstandard location, I
could get ESS to find the R binaries by including (setq
ess-directory-containing-r C:) in my .emacs file, but that no longer
works.

Dumb Fix to Problem 2:  Hack into ess-site.el and put the complete,
explicit path to the correct binary into
(setq-default inferior-R-program-name 'FULLPATHHERE)
which will break as soon as I upgrade R (assuming I am foolish enough to
ever do that again).



I can't help you with ESS.




Now I am ready to rebuild my R packages.  I have this nice perl script
that goes through the following procedure:

1. Set the path to include the correct Rtools directory.  (For reasons
that Gabor Grothendieck has pointed out previously, this is not a
permanent part of the path since doing so would override some built-in
Windows commands.)



Just curious:  how often do you use the Windows find command?  We have put
instructions in place for people to run the install process with a renamed
Rtools find command (which I think is the only conflict). The issue is that
more users who want to use the command line commands are familiar with the
Unix variant (which came first, by the way) than the Windows one, so
renaming the Rtools one would cause trouble for more people.


Its not just find - its also sort. And really R has no business
clobbering built in Windows commands. This is just wrong and really
causes anyone who does any significant amount of Windows batch
programming (or uses batch programs of any complexity) endless
problems.


Only those people who choose not to solve them in the recommended way.

Duncan Murdoch

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] R 3.0, Rtools3.0,l Windows7 64-bit, and permission agony

2013-04-20 Thread Hadley Wickham
 Just curious:  how often do you use the Windows find command?  We have put
 instructions in place for people to run the install process with a renamed
 Rtools find command (which I think is the only conflict). The issue is that
 more users who want to use the command line commands are familiar with the
 Unix variant (which came first, by the way) than the Windows one, so
 renaming the Rtools one would cause trouble for more people.

 Its not just find - its also sort. And really R has no business
 clobbering built in Windows commands. This is just wrong and really
 causes anyone who does any significant amount of Windows batch
 programming (or uses batch programs of any complexity) endless
 problems.

Which is presumably why Rtools doesn't modify the path by default.

Better solutions (e.g. Rstudio and devtools) temporarily set the path
on when you're calling R CMD *.

Hadley

--
Chief Scientist, RStudio
http://had.co.nz/

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] R 3.0, Rtools3.0,l Windows7 64-bit, and permission agony

2013-04-20 Thread Gabor Grothendieck
On Sat, Apr 20, 2013 at 10:45 AM, Hadley Wickham h.wick...@gmail.com wrote:
 Just curious:  how often do you use the Windows find command?  We have put
 instructions in place for people to run the install process with a renamed
 Rtools find command (which I think is the only conflict). The issue is that
 more users who want to use the command line commands are familiar with the
 Unix variant (which came first, by the way) than the Windows one, so
 renaming the Rtools one would cause trouble for more people.

 Its not just find - its also sort. And really R has no business
 clobbering built in Windows commands. This is just wrong and really
 causes anyone who does any significant amount of Windows batch
 programming (or uses batch programs of any complexity) endless
 problems.

 Which is presumably why Rtools doesn't modify the path by default.

 Better solutions (e.g. Rstudio and devtools) temporarily set the path
 on when you're calling R CMD *.

I am well aware of the various kludges to address this including my
own batchfiles ( http://batchfiles.googlecode.com ) which handles this
by temporarily changing the path as well; however, the real problem is
that Rtools does not play nice with Windows and that needs to be
addressed directly.

--
Statistics  Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Publishing my Package on CRAN

2013-04-20 Thread Uwe Ligges



On 19.04.2013 06:38, liuyipei wrote:

Hi,

I have a simple package with two functions. It essentially implements
estimators and data simulation for a paper I am writing  for immunology (and
in some sense, ecology).  How long is the typical CRAN review process


Typically less than 12 hours.


-- and
how long will it take to get through the process?  How selective is it?


Depends on how well the package is prepared.

Best,
Uwe Ligges




I have never published a package before, so I am wondering whether you guys
think this is a reasonable thing for me to promise in the paper that the
package will be available on CRAN.

Thank you for your advice in advance!



--
View this message in context: 
http://r.789695.n4.nabble.com/Publishing-my-Package-on-CRAN-tp4664676.html
Sent from the R devel mailing list archive at Nabble.com.

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel



__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] R 3.0, Rtools3.0,l Windows7 64-bit, and permission agony

2013-04-20 Thread Duncan Murdoch

On 13-04-20 11:09 AM, Gabor Grothendieck wrote:

On Sat, Apr 20, 2013 at 10:45 AM, Hadley Wickham h.wick...@gmail.com wrote:

Just curious:  how often do you use the Windows find command?  We have put
instructions in place for people to run the install process with a renamed
Rtools find command (which I think is the only conflict). The issue is that
more users who want to use the command line commands are familiar with the
Unix variant (which came first, by the way) than the Windows one, so
renaming the Rtools one would cause trouble for more people.


Its not just find - its also sort. And really R has no business
clobbering built in Windows commands. This is just wrong and really
causes anyone who does any significant amount of Windows batch
programming (or uses batch programs of any complexity) endless
problems.


Which is presumably why Rtools doesn't modify the path by default.

Better solutions (e.g. Rstudio and devtools) temporarily set the path
on when you're calling R CMD *.


I am well aware of the various kludges to address this including my
own batchfiles ( http://batchfiles.googlecode.com ) which handles this
by temporarily changing the path as well; however, the real problem is
that Rtools does not play nice with Windows and that needs to be
addressed directly.


It has been.  You ignored it.

Duncan Murdoch

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] R 3.0, Rtools3.0,l Windows7 64-bit, and permission agony

2013-04-20 Thread Gabor Grothendieck
On Sat, Apr 20, 2013 at 11:49 AM, Duncan Murdoch
murdoch.dun...@gmail.com wrote:
 On 13-04-20 11:09 AM, Gabor Grothendieck wrote:

 On Sat, Apr 20, 2013 at 10:45 AM, Hadley Wickham h.wick...@gmail.com
 wrote:

 Just curious:  how often do you use the Windows find command?  We have
 put
 instructions in place for people to run the install process with a
 renamed
 Rtools find command (which I think is the only conflict). The issue is
 that
 more users who want to use the command line commands are familiar with
 the
 Unix variant (which came first, by the way) than the Windows one, so
 renaming the Rtools one would cause trouble for more people.


 Its not just find - its also sort. And really R has no business
 clobbering built in Windows commands. This is just wrong and really
 causes anyone who does any significant amount of Windows batch
 programming (or uses batch programs of any complexity) endless
 problems.


 Which is presumably why Rtools doesn't modify the path by default.

 Better solutions (e.g. Rstudio and devtools) temporarily set the path
 on when you're calling R CMD *.


 I am well aware of the various kludges to address this including my
 own batchfiles ( http://batchfiles.googlecode.com ) which handles this
 by temporarily changing the path as well; however, the real problem is
 that Rtools does not play nice with Windows and that needs to be
 addressed directly.


 It has been.  You ignored it.

 Duncan Murdoch


If some change to address this has been made that would be great but
there is no mention of it on the Rtools page in the change history
section (the only documented change relates to the png/tiff/jpeg
libraries), there was no announcement that I saw and Rtools\bin still
contains find and sort so what specifically is the change?

--
Statistics  Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Linux distribution with gcc 4.8 and AddressSanitizer -- solved

2013-04-20 Thread Thomas Petzoldt

It works!

After some hours of compilation, reading the docs and testing,
I got it now working and was able to reproduce (and fix) the
reported error message.

Then ingredients of the successful AdressSanitizer (ASAN)
system were:

- Fedora 19 Alpha RC4 with gcc 4.8 on VirtualBox,
- manual installation of several additional libraries
  especially libasan-devel,
- setting of Makevars and a few environment variables,
- compilation of R-devel (2013-04-19) with address-sanitizer
  (and --enable-strict barrier)
  == the compilation of R itself went through
  without problems so that R runs without crash.

Finally:
- compilation and ASAN check of the affected package
  that reproduced the error message.
- bugfix and successful final test.


Maybe this was not the most parsimonious approach ;-)
but using a suitable self-compiled R seems to be unavoidable.



Again, many thanks for your help and the great R system!

Thomas P.



--
Thomas Petzoldt
Technische Universitaet Dresden
Faculty of Environmental Sciences
Institute of Hydrobiology
01062 Dresden, Germany

E-Mail: thomas.petzo...@tu-dresden.de
http://tu-dresden.de/Members/thomas.petzoldt

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] how to control the environment of a formula

2013-04-20 Thread Duncan Murdoch

On 13-04-19 2:57 PM, Thomas Alexander Gerds wrote:


hmm. I have tested a bit more, and found this perhaps more difficult
solve situation. even though I delete x, since x is part of the output
of the formula, the size of the object is twice as much as it should be:

test - function(x){
   x - rnorm(100)
   out - list(x=x)
   rm(x)
   out$f - as.formula(a~b)
   out
}
v - test(1)
x - rnorm(100)
save(v,file=~/tmp/v.rda)
save(x,file=~/tmp/x.rda)
system(ls -lah ~/tmp/*.rda)

-rw-rw-r-- 1 tag tag  15M Apr 19 20:52 /home/tag/tmp/v.rda
-rw-rw-r-- 1 tag tag 7,4M Apr 19 20:52 /home/tag/tmp/x.rda

can you solve this as well?


Yes, this is tricky.  The problem is that out is in the environment of 
out$f, so you get two copies when you save it.  (I think you won't have 
two copies in memory, because R only makes a copy when it needs to, but 
I haven't traced this.)


Here are two solutions, both have some problems.

1.  Don't put out in the environment:

test - function(x) {
  x - rnorm(100)
  out$x - list(x=x)
  out$f - a ~ b# the as.formula() was never needed
  # temporarily create a new environment
  local({
# get a copy of what you want to keep
out - out
# remove everything that you don't need from the formula
rm(list=c(x, out), envir=environment(out$f))
# return the local copy
out
  })
}

I don't like this because it is too tricky, but you could probably wrap 
the tricky bits into a little function (a variant on return() that 
cleans out the environment first), so it's probably what I would use if 
I was desperate to save space in saved copies.


2. Never evaluate the formula in the first place, so it doesn't pick up 
the environment:


test - function(x) {
  x - rnorm(100)
  out$x - list(x=x)
  out$f - quote(a ~ b)
  out
}

This is a lot simpler, but it might not work with some modelling 
functions, which would be confused by receiving the model formula 
unevaluated.  It also has the problems that you get with using 
.GlobalEnv as the environment of the formula, but maybe to a slightly 
lesser extent:  rather than having what is possibly the wrong 
environment, it doesn't have one at all.


Duncan Murdoch




thanks!
thomas

Duncan Murdoch murdoch.dun...@gmail.com writes:


On 13-04-18 11:39 AM, Thomas Alexander Gerds wrote:

Dear Duncan
thank you for taking the time to answer my questions! It will be
quite some work to delete all the objects generated inside the
function ... but if there is no other way to avoid a large
environment then this is what I will do.


It's not really that hard.  Use names - ls() in the function to get a
list of all of them; remove the names of variables that might be
needed in the formula (and the name of the formula itself); then use
rm(list=names) to delete everything else just before returning it.

Duncan Murdoch



__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] R 3.0, Rtools3.0,l Windows7 64-bit, and permission agony

2013-04-20 Thread Duncan Murdoch

On 13-04-20 12:30 PM, Gabor Grothendieck wrote:

On Sat, Apr 20, 2013 at 11:49 AM, Duncan Murdoch
murdoch.dun...@gmail.com wrote:

On 13-04-20 11:09 AM, Gabor Grothendieck wrote:


On Sat, Apr 20, 2013 at 10:45 AM, Hadley Wickham h.wick...@gmail.com
wrote:


Just curious:  how often do you use the Windows find command?  We have
put
instructions in place for people to run the install process with a
renamed
Rtools find command (which I think is the only conflict). The issue is
that
more users who want to use the command line commands are familiar with
the
Unix variant (which came first, by the way) than the Windows one, so
renaming the Rtools one would cause trouble for more people.



Its not just find - its also sort. And really R has no business
clobbering built in Windows commands. This is just wrong and really
causes anyone who does any significant amount of Windows batch
programming (or uses batch programs of any complexity) endless
problems.



Which is presumably why Rtools doesn't modify the path by default.

Better solutions (e.g. Rstudio and devtools) temporarily set the path
on when you're calling R CMD *.



I am well aware of the various kludges to address this including my
own batchfiles ( http://batchfiles.googlecode.com ) which handles this
by temporarily changing the path as well; however, the real problem is
that Rtools does not play nice with Windows and that needs to be
addressed directly.



It has been.  You ignored it.

Duncan Murdoch



If some change to address this has been made that would be great but
there is no mention of it on the Rtools page in the change history
section (the only documented change relates to the png/tiff/jpeg
libraries), there was no announcement that I saw and Rtools\bin still
contains find and sort so what specifically is the change?


It's not a change to Rtools, it's a change is to the build system in R: 
 it allows you to rename sort or find in your own copy of Rtools, and R 
will use whatever you specify.  You were informed of this when I did it 
in 2007, and I've mentioned it when the topic comes up here, most 
recently in the message quoted above.  That's a long time ago, so I 
don't remember if you tried it then, but I've never heard a complaint 
from anyone else that it doesn't work.


Duncan Murdoch

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] R 3.0, Rtools3.0,l Windows7 64-bit, and permission agony

2013-04-20 Thread Kevin Coombes


On 4/20/2013 12:54 PM, Duncan Murdoch wrote:

On 13-04-20 12:30 PM, Gabor Grothendieck wrote:

On Sat, Apr 20, 2013 at 11:49 AM, Duncan Murdoch
murdoch.dun...@gmail.com wrote:

On 13-04-20 11:09 AM, Gabor Grothendieck wrote:


On Sat, Apr 20, 2013 at 10:45 AM, Hadley Wickham h.wick...@gmail.com
wrote:


Just curious:  how often do you use the Windows find command?  
We have

put
instructions in place for people to run the install process with a
renamed
Rtools find command (which I think is the only conflict). The 
issue is

that
more users who want to use the command line commands are 
familiar with

the
Unix variant (which came first, by the way) than the Windows 
one, so

renaming the Rtools one would cause trouble for more people.



Its not just find - its also sort. And really R has no business
clobbering built in Windows commands. This is just wrong and really
causes anyone who does any significant amount of Windows batch
programming (or uses batch programs of any complexity) endless
problems.



Which is presumably why Rtools doesn't modify the path by default.

Better solutions (e.g. Rstudio and devtools) temporarily set the path
on when you're calling R CMD *.



I am well aware of the various kludges to address this including my
own batchfiles ( http://batchfiles.googlecode.com ) which handles this
by temporarily changing the path as well; however, the real problem is
that Rtools does not play nice with Windows and that needs to be
addressed directly.



It has been.  You ignored it.

Duncan Murdoch



If some change to address this has been made that would be great but
there is no mention of it on the Rtools page in the change history
section (the only documented change relates to the png/tiff/jpeg
libraries), there was no announcement that I saw and Rtools\bin still
contains find and sort so what specifically is the change?


It's not a change to Rtools, it's a change is to the build system in 
R:  it allows you to rename sort or find in your own copy of Rtools, 
and R will use whatever you specify.  You were informed of this when I 
did it in 2007, and I've mentioned it when the topic comes up here, 
most recently in the message quoted above.  That's a long time ago, so 
I don't remember if you tried it then, but I've never heard a 
complaint from anyone else that it doesn't work.


Duncan Murdoch

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


How do you do that?  (More explicitly, what steps would I have to take 
to redefine things like find.exe and sort.exe in Rtools so that R would 
know how to find them and use them? I can't figure that out from the 
earlier parts of these messages.)


__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] R 3.0, Rtools3.0,l Windows7 64-bit, and permission agony

2013-04-20 Thread Gabor Grothendieck
On Sat, Apr 20, 2013 at 1:54 PM, Duncan Murdoch
murdoch.dun...@gmail.com wrote:
 On 13-04-20 12:30 PM, Gabor Grothendieck wrote:

 On Sat, Apr 20, 2013 at 11:49 AM, Duncan Murdoch
 murdoch.dun...@gmail.com wrote:

 On 13-04-20 11:09 AM, Gabor Grothendieck wrote:


 On Sat, Apr 20, 2013 at 10:45 AM, Hadley Wickham h.wick...@gmail.com
 wrote:


 Just curious:  how often do you use the Windows find command?  We
 have
 put
 instructions in place for people to run the install process with a
 renamed
 Rtools find command (which I think is the only conflict). The issue
 is
 that
 more users who want to use the command line commands are familiar
 with
 the
 Unix variant (which came first, by the way) than the Windows one, so
 renaming the Rtools one would cause trouble for more people.



 Its not just find - its also sort. And really R has no business
 clobbering built in Windows commands. This is just wrong and really
 causes anyone who does any significant amount of Windows batch
 programming (or uses batch programs of any complexity) endless
 problems.



 Which is presumably why Rtools doesn't modify the path by default.

 Better solutions (e.g. Rstudio and devtools) temporarily set the path
 on when you're calling R CMD *.



 I am well aware of the various kludges to address this including my
 own batchfiles ( http://batchfiles.googlecode.com ) which handles this
 by temporarily changing the path as well; however, the real problem is
 that Rtools does not play nice with Windows and that needs to be
 addressed directly.



 It has been.  You ignored it.

 Duncan Murdoch


 If some change to address this has been made that would be great but
 there is no mention of it on the Rtools page in the change history
 section (the only documented change relates to the png/tiff/jpeg
 libraries), there was no announcement that I saw and Rtools\bin still
 contains find and sort so what specifically is the change?


 It's not a change to Rtools, it's a change is to the build system in R:  it
 allows you to rename sort or find in your own copy of Rtools, and R will use
 whatever you specify.  You were informed of this when I did it in 2007, and
 I've mentioned it when the topic comes up here, most recently in the message
 quoted above.  That's a long time ago, so I don't remember if you tried it
 then, but I've never heard a complaint from anyone else that it doesn't
 work.


I certainly was not aware of this and posts in this thread suggest
that others were not aware of it either.

Perhaps you could provide some details and links. I am sure many
people would be interested.


--
Statistics  Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] how to control the environment of a formula

2013-04-20 Thread Gabor Grothendieck
On Sat, Apr 20, 2013 at 1:44 PM, Duncan Murdoch
murdoch.dun...@gmail.com wrote:
 On 13-04-19 2:57 PM, Thomas Alexander Gerds wrote:


 hmm. I have tested a bit more, and found this perhaps more difficult
 solve situation. even though I delete x, since x is part of the output
 of the formula, the size of the object is twice as much as it should be:

 test - function(x){
x - rnorm(100)
out - list(x=x)
rm(x)
out$f - as.formula(a~b)
out
 }
 v - test(1)
 x - rnorm(100)
 save(v,file=~/tmp/v.rda)
 save(x,file=~/tmp/x.rda)
 system(ls -lah ~/tmp/*.rda)

 -rw-rw-r-- 1 tag tag  15M Apr 19 20:52 /home/tag/tmp/v.rda
 -rw-rw-r-- 1 tag tag 7,4M Apr 19 20:52 /home/tag/tmp/x.rda

 can you solve this as well?


 Yes, this is tricky.  The problem is that out is in the environment of
 out$f, so you get two copies when you save it.  (I think you won't have two
 copies in memory, because R only makes a copy when it needs to, but I
 haven't traced this.)

 Here are two solutions, both have some problems.

 1.  Don't put out in the environment:


 test - function(x) {
   x - rnorm(100)
   out$x - list(x=x)
   out$f - a ~ b# the as.formula() was never needed
   # temporarily create a new environment
   local({
 # get a copy of what you want to keep
 out - out
 # remove everything that you don't need from the formula
 rm(list=c(x, out), envir=environment(out$f))
 # return the local copy
 out
   })
 }

 I don't like this because it is too tricky, but you could probably wrap the
 tricky bits into a little function (a variant on return() that cleans out
 the environment first), so it's probably what I would use if I was desperate
 to save space in saved copies.

 2. Never evaluate the formula in the first place, so it doesn't pick up the
 environment:


 test - function(x) {
   x - rnorm(100)
   out$x - list(x=x)
   out$f - quote(a ~ b)
   out
 }

 This is a lot simpler, but it might not work with some modelling functions,
 which would be confused by receiving the model formula unevaluated.  It also
 has the problems that you get with using .GlobalEnv as the environment of
 the formula, but maybe to a slightly lesser extent:  rather than having what
 is possibly the wrong environment, it doesn't have one at all.

An approach along the lines of Duncan's last solution that works with
lm but may or may not work with other regression-style functions is to
use a character string:

fit - lm(demand ~ Time, BOD)

As long as you are only saving the input you should be OK but if you
are saving the output of lm then you are back to the same problem
since the lm object will contain a formula.

 class(formula(fit))
[1] formula

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] R 3.0, Rtools3.0,l Windows7 64-bit, and permission agony

2013-04-20 Thread Duncan Murdoch

On 13-04-20 2:02 PM, Kevin Coombes wrote:


On 4/20/2013 12:54 PM, Duncan Murdoch wrote:

On 13-04-20 12:30 PM, Gabor Grothendieck wrote:

On Sat, Apr 20, 2013 at 11:49 AM, Duncan Murdoch
murdoch.dun...@gmail.com wrote:

On 13-04-20 11:09 AM, Gabor Grothendieck wrote:


On Sat, Apr 20, 2013 at 10:45 AM, Hadley Wickham h.wick...@gmail.com
wrote:


Just curious:  how often do you use the Windows find command?
We have
put
instructions in place for people to run the install process with a
renamed
Rtools find command (which I think is the only conflict). The
issue is
that
more users who want to use the command line commands are
familiar with
the
Unix variant (which came first, by the way) than the Windows
one, so
renaming the Rtools one would cause trouble for more people.



Its not just find - its also sort. And really R has no business
clobbering built in Windows commands. This is just wrong and really
causes anyone who does any significant amount of Windows batch
programming (or uses batch programs of any complexity) endless
problems.



Which is presumably why Rtools doesn't modify the path by default.

Better solutions (e.g. Rstudio and devtools) temporarily set the path
on when you're calling R CMD *.



I am well aware of the various kludges to address this including my
own batchfiles ( http://batchfiles.googlecode.com ) which handles this
by temporarily changing the path as well; however, the real problem is
that Rtools does not play nice with Windows and that needs to be
addressed directly.



It has been.  You ignored it.

Duncan Murdoch



If some change to address this has been made that would be great but
there is no mention of it on the Rtools page in the change history
section (the only documented change relates to the png/tiff/jpeg
libraries), there was no announcement that I saw and Rtools\bin still
contains find and sort so what specifically is the change?


It's not a change to Rtools, it's a change is to the build system in
R:  it allows you to rename sort or find in your own copy of Rtools,
and R will use whatever you specify.  You were informed of this when I
did it in 2007, and I've mentioned it when the topic comes up here,
most recently in the message quoted above.  That's a long time ago, so
I don't remember if you tried it then, but I've never heard a
complaint from anyone else that it doesn't work.

Duncan Murdoch

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


How do you do that?  (More explicitly, what steps would I have to take
to redefine things like find.exe and sort.exe in Rtools so that R would
know how to find them and use them? I can't figure that out from the
earlier parts of these messages.)



Rename them to whatever you want in the Rtools install, then edit the 
definitions.  I think currently they are in src/gnuwin32/Makefile and 
src/gnuwin32/MkRules (one in each), but I'd suggest you just search 
files named M* for the strings sort and find, in case I've got it 
wrong, or it has changed since the last time I looked.


If you try to build R itself rather than just packages, you may need to 
do more edits, because some of the makefiles for things like the jpeg 
libraries weren't written by us, and may have these commands hard-coded.


Duncan Murdoch

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] R 3.0, Rtools3.0,l Windows7 64-bit, and permission agony

2013-04-20 Thread Gabor Grothendieck
On Sat, Apr 20, 2013 at 2:21 PM, Duncan Murdoch
murdoch.dun...@gmail.com wrote:
 On 13-04-20 2:02 PM, Kevin Coombes wrote:


 On 4/20/2013 12:54 PM, Duncan Murdoch wrote:

 On 13-04-20 12:30 PM, Gabor Grothendieck wrote:

 On Sat, Apr 20, 2013 at 11:49 AM, Duncan Murdoch
 murdoch.dun...@gmail.com wrote:

 On 13-04-20 11:09 AM, Gabor Grothendieck wrote:


 On Sat, Apr 20, 2013 at 10:45 AM, Hadley Wickham h.wick...@gmail.com
 wrote:


 Just curious:  how often do you use the Windows find command?
 We have
 put
 instructions in place for people to run the install process with a
 renamed
 Rtools find command (which I think is the only conflict). The
 issue is
 that
 more users who want to use the command line commands are
 familiar with
 the
 Unix variant (which came first, by the way) than the Windows
 one, so
 renaming the Rtools one would cause trouble for more people.



 Its not just find - its also sort. And really R has no business
 clobbering built in Windows commands. This is just wrong and really
 causes anyone who does any significant amount of Windows batch
 programming (or uses batch programs of any complexity) endless
 problems.



 Which is presumably why Rtools doesn't modify the path by default.

 Better solutions (e.g. Rstudio and devtools) temporarily set the path
 on when you're calling R CMD *.



 I am well aware of the various kludges to address this including my
 own batchfiles ( http://batchfiles.googlecode.com ) which handles this
 by temporarily changing the path as well; however, the real problem is
 that Rtools does not play nice with Windows and that needs to be
 addressed directly.



 It has been.  You ignored it.

 Duncan Murdoch


 If some change to address this has been made that would be great but
 there is no mention of it on the Rtools page in the change history
 section (the only documented change relates to the png/tiff/jpeg
 libraries), there was no announcement that I saw and Rtools\bin still
 contains find and sort so what specifically is the change?


 It's not a change to Rtools, it's a change is to the build system in
 R:  it allows you to rename sort or find in your own copy of Rtools,
 and R will use whatever you specify.  You were informed of this when I
 did it in 2007, and I've mentioned it when the topic comes up here,
 most recently in the message quoted above.  That's a long time ago, so
 I don't remember if you tried it then, but I've never heard a
 complaint from anyone else that it doesn't work.

 Duncan Murdoch

 __
 R-devel@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-devel


 How do you do that?  (More explicitly, what steps would I have to take
 to redefine things like find.exe and sort.exe in Rtools so that R would
 know how to find them and use them? I can't figure that out from the
 earlier parts of these messages.)


 Rename them to whatever you want in the Rtools install, then edit the
 definitions.  I think currently they are in src/gnuwin32/Makefile and
 src/gnuwin32/MkRules (one in each), but I'd suggest you just search files
 named M* for the strings sort and find, in case I've got it wrong, or it
 has changed since the last time I looked.

 If you try to build R itself rather than just packages, you may need to do
 more edits, because some of the makefiles for things like the jpeg libraries
 weren't written by us, and may have these commands hard-coded.

Are you suggesting that R itself be rebuild?  Rtools be rebuilt?  Some
clarity on this and the process to do it would be helpful.  I was
really looking for a way to do this with an out of the box R
installation since from a practical viewpoint few are going to want to
build their own software.

--
Statistics  Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Publishing my Package on CRAN

2013-04-20 Thread Henrik Bengtsson
If you're not aware of it, you should know of:

http://cran.r-project.org/web/packages/policies.html

/Henrik

On Sat, Apr 20, 2013 at 8:42 AM, Uwe Ligges
lig...@statistik.tu-dortmund.de wrote:


 On 19.04.2013 06:38, liuyipei wrote:

 Hi,

 I have a simple package with two functions. It essentially implements
 estimators and data simulation for a paper I am writing  for immunology
 (and
 in some sense, ecology).  How long is the typical CRAN review process


 Typically less than 12 hours.


 -- and
 how long will it take to get through the process?  How selective is it?


 Depends on how well the package is prepared.

 Best,
 Uwe Ligges




 I have never published a package before, so I am wondering whether you
 guys
 think this is a reasonable thing for me to promise in the paper that the
 package will be available on CRAN.

 Thank you for your advice in advance!



 --
 View this message in context:
 http://r.789695.n4.nabble.com/Publishing-my-Package-on-CRAN-tp4664676.html
 Sent from the R devel mailing list archive at Nabble.com.

 __
 R-devel@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-devel


 __
 R-devel@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-devel

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] R 3.0, Rtools3.0,l Windows7 64-bit, and permission agony

2013-04-20 Thread Duncan Murdoch

On 13-04-20 2:39 PM, Gabor Grothendieck wrote:

On Sat, Apr 20, 2013 at 2:21 PM, Duncan Murdoch
murdoch.dun...@gmail.com wrote:

On 13-04-20 2:02 PM, Kevin Coombes wrote:



On 4/20/2013 12:54 PM, Duncan Murdoch wrote:


On 13-04-20 12:30 PM, Gabor Grothendieck wrote:


On Sat, Apr 20, 2013 at 11:49 AM, Duncan Murdoch
murdoch.dun...@gmail.com wrote:


On 13-04-20 11:09 AM, Gabor Grothendieck wrote:



On Sat, Apr 20, 2013 at 10:45 AM, Hadley Wickham h.wick...@gmail.com
wrote:



Just curious:  how often do you use the Windows find command?
We have
put
instructions in place for people to run the install process with a
renamed
Rtools find command (which I think is the only conflict). The
issue is
that
more users who want to use the command line commands are
familiar with
the
Unix variant (which came first, by the way) than the Windows
one, so
renaming the Rtools one would cause trouble for more people.




Its not just find - its also sort. And really R has no business
clobbering built in Windows commands. This is just wrong and really
causes anyone who does any significant amount of Windows batch
programming (or uses batch programs of any complexity) endless
problems.




Which is presumably why Rtools doesn't modify the path by default.

Better solutions (e.g. Rstudio and devtools) temporarily set the path
on when you're calling R CMD *.




I am well aware of the various kludges to address this including my
own batchfiles ( http://batchfiles.googlecode.com ) which handles this
by temporarily changing the path as well; however, the real problem is
that Rtools does not play nice with Windows and that needs to be
addressed directly.




It has been.  You ignored it.

Duncan Murdoch



If some change to address this has been made that would be great but
there is no mention of it on the Rtools page in the change history
section (the only documented change relates to the png/tiff/jpeg
libraries), there was no announcement that I saw and Rtools\bin still
contains find and sort so what specifically is the change?



It's not a change to Rtools, it's a change is to the build system in
R:  it allows you to rename sort or find in your own copy of Rtools,
and R will use whatever you specify.  You were informed of this when I
did it in 2007, and I've mentioned it when the topic comes up here,
most recently in the message quoted above.  That's a long time ago, so
I don't remember if you tried it then, but I've never heard a
complaint from anyone else that it doesn't work.

Duncan Murdoch

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel



How do you do that?  (More explicitly, what steps would I have to take
to redefine things like find.exe and sort.exe in Rtools so that R would
know how to find them and use them? I can't figure that out from the
earlier parts of these messages.)



Rename them to whatever you want in the Rtools install, then edit the
definitions.  I think currently they are in src/gnuwin32/Makefile and
src/gnuwin32/MkRules (one in each), but I'd suggest you just search files
named M* for the strings sort and find, in case I've got it wrong, or it
has changed since the last time I looked.

If you try to build R itself rather than just packages, you may need to do
more edits, because some of the makefiles for things like the jpeg libraries
weren't written by us, and may have these commands hard-coded.


Are you suggesting that R itself be rebuild?  Rtools be rebuilt?  Some
clarity on this and the process to do it would be helpful.  I was
really looking for a way to do this with an out of the box R
installation since from a practical viewpoint few are going to want to
build their own software.


No. No. Can't help you. So?

Duncan Murdoch

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] R 3.0, Rtools3.0,l Windows7 64-bit, and permission agony

2013-04-20 Thread Kevin Coombes


On 4/20/2013 1:21 PM, Duncan Murdoch wrote:

On 13-04-20 2:02 PM, Kevin Coombes wrote:

On 4/20/2013 12:54 PM, Duncan Murdoch wrote:

It's not a change to Rtools, it's a change is to the build system in
R:  it allows you to rename sort or find in your own copy of Rtools,
and R will use whatever you specify.  You were informed of this when I
did it in 2007, and I've mentioned it when the topic comes up here,
most recently in the message quoted above.  That's a long time ago, so
I don't remember if you tried it then, but I've never heard a
complaint from anyone else that it doesn't work.

Duncan Murdoch

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


How do you do that?  (More explicitly, what steps would I have to take
to redefine things like find.exe and sort.exe in Rtools so that R would
know how to find them and use them? I can't figure that out from the
earlier parts of these messages.)



Rename them to whatever you want in the Rtools install, then edit the 
definitions.  I think currently they are in src/gnuwin32/Makefile and 
src/gnuwin32/MkRules (one in each), but I'd suggest you just search 
files named M* for the strings sort and find, in case I've got it 
wrong, or it has changed since the last time I looked.


If you try to build R itself rather than just packages, you may need 
to do more edits, because some of the makefiles for things like the 
jpeg libraries weren't written by us, and may have these commands 
hard-coded.


Duncan Murdoch


To most Windows users, the Rtools install  would seem to refer to 
getting the bundled Rtools30.exe from the CRAN web site, double-clicking 
on it, selecting the options form the GUI windows that appear, and 
clicking install.  There is no option in this procedure to change the 
names of find or sort.


As far as I can tell, the steps you are recommending take place in an 
earlier build step.  This would require the user who wants to do this to 
rebuild Rtools in its entirety, which is more trouble than it is likely 
to be worth. Especially when you can avoid the problem by using your own 
batch script or perl script to reset the path on those relatively rare 
occasions when you need to use Rtools.  Since buiilding Rtools for a 
Windows machine is something than CRAN does on a regular basis, why 
can't they just change the names there (and not bother the UNIX users, 
and probably not even bother the UNIX users who find themselves banished 
to the Windows wilderness).  Just call them unixfind and unixsort 
and everyone will be able to figure it out


__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] R 3.0, Rtools3.0,l Windows7 64-bit, and permission agony

2013-04-20 Thread Hadley Wickham
 As far as I can tell, the steps you are recommending take place in an
 earlier build step.  This would require the user who wants to do this to
 rebuild Rtools in its entirety, which is more trouble than it is likely to
 be worth. Especially when you can avoid the problem by using your own batch
 script or perl script to reset the path on those relatively rare occasions
 when you need to use Rtools.  Since buiilding Rtools for a Windows machine
 is something than CRAN does on a regular basis, why can't they just change
 the names there (and not bother the UNIX users, and probably not even bother
 the UNIX users who find themselves banished to the Windows wilderness).
 Just call them unixfind and unixsort and everyone will be able to figure
 it out

Because the point of Rtools is to make windows more like linux, rather
than less?

I really don't understand the complaints in this thread - I have
regularly had classes of 10-20 windows users build a package with no
prior experience, and simply downloading and installing Rtools.  In my
opinion Rtools uses the right defaults, and with a bit of extra
scripting work (painful at first, but only needs to be done once, e.g.
https://github.com/hadley/devtools/blob/master/R/rtools.r) it's
painless to use from R.

Hadley

--
Chief Scientist, RStudio
http://had.co.nz/

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] R 3.0, Rtools3.0,l Windows7 64-bit, and permission agony

2013-04-20 Thread Gabor Grothendieck
On Sat, Apr 20, 2013 at 9:13 PM, Hadley Wickham h.wick...@gmail.com wrote:
 As far as I can tell, the steps you are recommending take place in an
 earlier build step.  This would require the user who wants to do this to
 rebuild Rtools in its entirety, which is more trouble than it is likely to
 be worth. Especially when you can avoid the problem by using your own batch
 script or perl script to reset the path on those relatively rare occasions
 when you need to use Rtools.  Since buiilding Rtools for a Windows machine
 is something than CRAN does on a regular basis, why can't they just change
 the names there (and not bother the UNIX users, and probably not even bother
 the UNIX users who find themselves banished to the Windows wilderness).
 Just call them unixfind and unixsort and everyone will be able to figure
 it out

 Because the point of Rtools is to make windows more like linux, rather
 than less?

 I really don't understand the complaints in this thread - I have
 regularly had classes of 10-20 windows users build a package with no
 prior experience, and simply downloading and installing Rtools.  In my
 opinion Rtools uses the right defaults, and with a bit of extra
 scripting work (painful at first, but only needs to be done once, e.g.
 https://github.com/hadley/devtools/blob/master/R/rtools.r) it's
 painless to use from R.

The problem is that if you don't just use the PC for running R but use
it to run other programs too then any program and that utilizes
Windows batch scripts making use of find.exe or sort.exe likely won't
work if Rtools is on your path.

The fact that devtools, batchfiles and Rcpp have workarounds mitigates
it somewhat but the problem should be fixed so it works out-of-the-box
once and for all.

-- 
Statistics  Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel