[Rd] Building R on Windows 7 -- No rule to make target `etc/GETDESC', needed by `fixetc'.

2011-09-23 Thread Johannes Egner
Hi all,

I have been experiencing difficulties building R (be this 2.13.1,
beta, devel, or rc) on Windows 7 64bit.

I believe I am following the manual religiously, and don't think I am
doing anything differently from the many successful build attempts in
the past. Unzipping the tarball works fine, but when I invoke make, I
get (shown for R-rc, same for 2-13.1):

H:\R_Builds\R-rc\src\gnuwin32make all recommended
cat MkRules.dist MkRules.rules  MkRules
 Building ../../../library/base/R/Rprofile from
../../library/profile/Common.R
../../library/profile/Rprofile.windows
mkdir -p ../../../library/base/R
cp -p html/rwin.html ../../../doc/html/index.html
make[3]: *** No rule to make target `etc/GETDESC', needed by `fixetc'.  Stop.
make[2]: *** [fixfiles] Error 2
make[1]: *** [rbuild] Error 2
make: *** [all] Error 2

Any help?
Thanks, Jo

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


Re: [Rd] Building R on Windows 7 -- No rule to make target `etc/GETDESC', needed by `fixetc'.

2011-09-23 Thread Uwe Ligges
Fine for me with R-2.13.2 RC. No idea where you got the differences 
from. Perhaps reinstall recent version of the Rtools, check the PATH, 
make sure this is a clean checkout / directory and try again.


Uwe ligges



On 23.09.2011 13:46, Johannes Egner wrote:

Hi all,

I have been experiencing difficulties building R (be this 2.13.1,
beta, devel, or rc) on Windows 7 64bit.

I believe I am following the manual religiously, and don't think I am
doing anything differently from the many successful build attempts in
the past. Unzipping the tarball works fine, but when I invoke make, I
get (shown for R-rc, same for 2-13.1):

H:\R_Builds\R-rc\src\gnuwin32make all recommended
cat MkRules.dist MkRules.rules  MkRules
 Building ../../../library/base/R/Rprofile from
../../library/profile/Common.R
../../library/profile/Rprofile.windows
mkdir -p ../../../library/base/R
cp -p html/rwin.html ../../../doc/html/index.html
make[3]: *** No rule to make target `etc/GETDESC', needed by `fixetc'.  Stop.
make[2]: *** [fixfiles] Error 2
make[1]: *** [rbuild] Error 2
make: *** [all] Error 2

Any help?
Thanks, Jo

__
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


[Rd] Issue with seek() on gzipped connections in R-devel

2011-09-23 Thread Jon Clayden
Dear all,

In R-devel (2011-09-23 r57050), I'm running into a serious problem
with seek()ing on connections opened with gzfile(). A warning is
generated and the file position does not seek to the requested
location. It doesn't seem to occur all the time - I tried to create a
small example file to illustrate it, but the problem didn't occur.
However, it can be seen with a file I use for testing my packages,
which is available through the URL
https://github.com/jonclayden/tractor/blob/master/tests/data/nifti/maskedb0_lia.nii.gz?raw=true:

 con - gzfile(~/Downloads/maskedb0_lia.nii.gz,rb)
 seek(con, 352)
[1] 0
Warning message:
In seek.connection(con, 352) :
  seek on a gzfile connection returned an internal error
 seek(con, NA)
[1] 190

The same commands with the same file work as expected in R 2.13.1, and
have worked over many previous versions of R.

 con - gzfile(~/Downloads/maskedb0_lia.nii.gz,rb)
 seek(con, 352)
[1] 0
 seek(con, NA)
[1] 352

My sessionInfo() output is:

R Under development (unstable) (2011-09-23 r57050)
Platform: x86_64-apple-darwin11.1.0 (64-bit)

locale:
[1] en_GB.UTF-8/en_US.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages:
[1] splines   stats graphics  grDevices utils datasets  methods
[8] base

other attached packages:
[1] tractor.nt_2.0.1  tractor.session_2.0.3 tractor.utils_2.0.0
[4] tractor.base_2.0.3reportr_0.2.0

This seems to occur whether or not R is compiled with
--with-system-zlib. I see some zlib-related changes mentioned in the
NEWS, but I don't see any indication that this is expected. Could
anyone shed any light on it, please?

Thanks and all the best,
Jon

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


Re: [Rd] Issue with seek() on gzipped connections in R-devel

2011-09-23 Thread Prof Brian Ripley
Basically seek with zlib is flaky: we've stumbled on several errors. 
If it worked for you in the past, count yourself lucky.  I'd suggest 
you avoid relying on it in your packages.


On Fri, 23 Sep 2011, Jon Clayden wrote:


Dear all,

In R-devel (2011-09-23 r57050), I'm running into a serious problem
with seek()ing on connections opened with gzfile(). A warning is
generated and the file position does not seek to the requested
location. It doesn't seem to occur all the time - I tried to create a
small example file to illustrate it, but the problem didn't occur.
However, it can be seen with a file I use for testing my packages,
which is available through the URL
https://github.com/jonclayden/tractor/blob/master/tests/data/nifti/maskedb0_lia.nii.gz?raw=true:


con - gzfile(~/Downloads/maskedb0_lia.nii.gz,rb)
seek(con, 352)

[1] 0
Warning message:
In seek.connection(con, 352) :
 seek on a gzfile connection returned an internal error

seek(con, NA)

[1] 190

The same commands with the same file work as expected in R 2.13.1, and
have worked over many previous versions of R.


con - gzfile(~/Downloads/maskedb0_lia.nii.gz,rb)
seek(con, 352)

[1] 0

seek(con, NA)

[1] 352

My sessionInfo() output is:

R Under development (unstable) (2011-09-23 r57050)
Platform: x86_64-apple-darwin11.1.0 (64-bit)

locale:
[1] en_GB.UTF-8/en_US.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages:
[1] splines   stats graphics  grDevices utils datasets  methods
[8] base

other attached packages:
[1] tractor.nt_2.0.1  tractor.session_2.0.3 tractor.utils_2.0.0
[4] tractor.base_2.0.3reportr_0.2.0

This seems to occur whether or not R is compiled with
--with-system-zlib. I see some zlib-related changes mentioned in the
NEWS, but I don't see any indication that this is expected. Could
anyone shed any light on it, please?

Thanks and all the best,
Jon

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



--
Brian D. Ripley,  rip...@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

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


[Rd] should dir(all=TRUE) return . and ..?

2011-09-23 Thread William Dunlap
dir(all=TRUE) returns the file names . and ..
while dir(recursive=TRUE, all=TRUE, include.dirs=TRUE)
does not.  I always filter out the . and .. entries
and was wondering if anyone would mind if dir(all=TRUE)
just omitted them?  It might make recursive file operations
like cleaning out a directory safer, as
  unlink(recursive=TRUE, dir(all=TRUE, dirToClean))
might start attacking dirToClean/.., then dirToClean/../..,
etc., until your disk is empty.

   dir.create(tdir - tempfile(tdir))
   file.create(file.path(tdir, c(.dotFile, noDotFile)))
  [1] TRUE TRUE
   dir.create(file.path(tdir, .dotDir))
   file.create(file.path(tdir, .dotDir, c(noDotFileInDotDir, 
.dotFileInDotDir)))
  [1] TRUE TRUE
   dir(tdir, all=TRUE) # omit . and .. here?
  [1] . ...dotDir   .dotFile 
  [5] noDotFile
   dir(tdir, all=TRUE, recursive=TRUE, include.dirs=TRUE)
  [1] .dotDir   .dotDir/.dotFileInDotDir 
  [3] .dotDir/noDotFileInDotDir .dotFile 
  [5] noDotFile

Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com 

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


Re: [Rd] Issue with seek() on gzipped connections in R-devel

2011-09-23 Thread Jeffrey Ryan
seek() in general is a bad idea IMO if you are writing cross-platform code.

?seek

Warning:

 Use of ‘seek’ on Windows is discouraged.  We have found so many
 errors in the Windows implementation of file positioning that
 users are advised to use it only at their own risk, and asked not
 to waste the R developers' time with bug reports on Windows'
 deficiencies.

Aside from making me laugh, the above highlights the core reason to not use IMO.

For not zipped files, you can try the mmap package.  ?mmap and ?types
are good starting points.  Allows for accessing binary data on disk
with very simple R-like semantics, and is very fast.  Not as fast as a
sequential read... but fast.  At present this is 'little endian' only
though, but that describes most of the world today.

Best,
Jeff

On Fri, Sep 23, 2011 at 8:58 AM, Jon Clayden jon.clay...@gmail.com wrote:
 Dear all,

 In R-devel (2011-09-23 r57050), I'm running into a serious problem
 with seek()ing on connections opened with gzfile(). A warning is
 generated and the file position does not seek to the requested
 location. It doesn't seem to occur all the time - I tried to create a
 small example file to illustrate it, but the problem didn't occur.
 However, it can be seen with a file I use for testing my packages,
 which is available through the URL
 https://github.com/jonclayden/tractor/blob/master/tests/data/nifti/maskedb0_lia.nii.gz?raw=true:

 con - gzfile(~/Downloads/maskedb0_lia.nii.gz,rb)
 seek(con, 352)
 [1] 0
 Warning message:
 In seek.connection(con, 352) :
  seek on a gzfile connection returned an internal error
 seek(con, NA)
 [1] 190

 The same commands with the same file work as expected in R 2.13.1, and
 have worked over many previous versions of R.

 con - gzfile(~/Downloads/maskedb0_lia.nii.gz,rb)
 seek(con, 352)
 [1] 0
 seek(con, NA)
 [1] 352

 My sessionInfo() output is:

 R Under development (unstable) (2011-09-23 r57050)
 Platform: x86_64-apple-darwin11.1.0 (64-bit)

 locale:
 [1] en_GB.UTF-8/en_US.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

 attached base packages:
 [1] splines   stats     graphics  grDevices utils     datasets  methods
 [8] base

 other attached packages:
 [1] tractor.nt_2.0.1      tractor.session_2.0.3 tractor.utils_2.0.0
 [4] tractor.base_2.0.3    reportr_0.2.0

 This seems to occur whether or not R is compiled with
 --with-system-zlib. I see some zlib-related changes mentioned in the
 NEWS, but I don't see any indication that this is expected. Could
 anyone shed any light on it, please?

 Thanks and all the best,
 Jon

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




-- 
Jeffrey Ryan
jeffrey.r...@lemnica.com

www.lemnica.com
www.esotericR.com

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


Re: [Rd] Issue with seek() on gzipped connections in R-devel

2011-09-23 Thread Jon Clayden
Thanks for the replies. I take the point, although it does seem like a
substantial regression (on non-Windows platforms).

I like to keep the external dependencies of my packages minimal, but I
will look into the mmap package - thanks, Jeff, for the tip.

Aside from that, though, what is the alternative to using seek? If I
want to read something at (original, uncompressed) byte offset 352, as
here, do I have to read and discard everything that comes before it
first? That seems inelegant at best...

Regards,
Jon


On 23 September 2011 16:54, Jeffrey Ryan jeffrey.r...@lemnica.com wrote:
 seek() in general is a bad idea IMO if you are writing cross-platform code.

 ?seek

 Warning:

     Use of ‘seek’ on Windows is discouraged.  We have found so many
     errors in the Windows implementation of file positioning that
     users are advised to use it only at their own risk, and asked not
     to waste the R developers' time with bug reports on Windows'
     deficiencies.

 Aside from making me laugh, the above highlights the core reason to not use 
 IMO.

 For not zipped files, you can try the mmap package.  ?mmap and ?types
 are good starting points.  Allows for accessing binary data on disk
 with very simple R-like semantics, and is very fast.  Not as fast as a
 sequential read... but fast.  At present this is 'little endian' only
 though, but that describes most of the world today.

 Best,
 Jeff

 On Fri, Sep 23, 2011 at 8:58 AM, Jon Clayden jon.clay...@gmail.com wrote:
 Dear all,

 In R-devel (2011-09-23 r57050), I'm running into a serious problem
 with seek()ing on connections opened with gzfile(). A warning is
 generated and the file position does not seek to the requested
 location. It doesn't seem to occur all the time - I tried to create a
 small example file to illustrate it, but the problem didn't occur.
 However, it can be seen with a file I use for testing my packages,
 which is available through the URL
 https://github.com/jonclayden/tractor/blob/master/tests/data/nifti/maskedb0_lia.nii.gz?raw=true:

 con - gzfile(~/Downloads/maskedb0_lia.nii.gz,rb)
 seek(con, 352)
 [1] 0
 Warning message:
 In seek.connection(con, 352) :
  seek on a gzfile connection returned an internal error
 seek(con, NA)
 [1] 190

 The same commands with the same file work as expected in R 2.13.1, and
 have worked over many previous versions of R.

 con - gzfile(~/Downloads/maskedb0_lia.nii.gz,rb)
 seek(con, 352)
 [1] 0
 seek(con, NA)
 [1] 352

 My sessionInfo() output is:

 R Under development (unstable) (2011-09-23 r57050)
 Platform: x86_64-apple-darwin11.1.0 (64-bit)

 locale:
 [1] en_GB.UTF-8/en_US.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

 attached base packages:
 [1] splines   stats     graphics  grDevices utils     datasets  methods
 [8] base

 other attached packages:
 [1] tractor.nt_2.0.1      tractor.session_2.0.3 tractor.utils_2.0.0
 [4] tractor.base_2.0.3    reportr_0.2.0

 This seems to occur whether or not R is compiled with
 --with-system-zlib. I see some zlib-related changes mentioned in the
 NEWS, but I don't see any indication that this is expected. Could
 anyone shed any light on it, please?

 Thanks and all the best,
 Jon

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




 --
 Jeffrey Ryan
 jeffrey.r...@lemnica.com

 www.lemnica.com
 www.esotericR.com


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


Re: [Rd] could not find function after import

2011-09-23 Thread steven mosher
Duncan

I have a related question.

I need one function from R.utils.  But R.utils depends on R.oo and  R.methodsS3.
so I made R.util an import and then used importFrom() in the namespace.

The package passed the  check.  However when it came to use the function
it had not been loaded? do I need to add the upstream packages that
R.util  depends
upon?  also in the code do I need a library or require?

A bit confused

Steve

On Mon, Sep 19, 2011 at 5:09 PM, Duncan Murdoch
murdoch.dun...@gmail.com wrote:
 On 11-09-19 4:48 PM, Stephanie M. Gogarten wrote:

 I am trying to build a package (GWASTools, submitted to Bioconductor)
 that uses the sandwich package.  I have references to sandwich in
 DESCRIPTION:
 Imports: methods, DBI, RSQLite, sandwich, survival, DNAcopy

 and NAMESPACE:
 import(sandwich)

 In the code itself is a call to vcovHC:
 Vhat- vcovHC(mod, type=HC0)

 I have sandwich version 2.2-7 installed.

 When I run R CMD check on my package, I get the following error during
 checking of examples:
 * using R Under development (unstable) (2011-08-29 r56828)
 * using platform: x86_64-apple-darwin9.8.0 (64-bit)
 ...
 * checking examples ... ERROR
 ...
 Error in estfun.glm(x) : could not find function is.zoo
 Calls: assocTestRegression ... meatHC -  rowMeans -  is.data.frame -
 estfun -  estfun.glm

 I import sandwich, sandwich depends on zoo, but a function in zoo cannot
 be found during execution.

 I tried to get around this by explicitly including a require statement
 in assocTestRegression:
 require(sandwich)

 The example now runs, but I have a warning in R CMD check:
 * checking for unstated dependencies in R code ... WARNING
 ‘library’ or ‘require’ call not declared from: ‘sandwich’

 I am not sure why this is a problem, as there is a require statement
 (for a different package) in another function which does not cause any
 warnings.

 Can anyone advise on how to get my package to successfully pass R CMD
 check?


 If you said that your package Depends on sandwich, you'd probably pass
 checks, but this is arguably a bug in the sandwich package.

 The problem is that since you only import sandwich, it never gets attached.
  So it never attaches its dependency zoo.   It should import zoo (or import
 the functions in zoo that it uses) to work properly the way you are calling
 it.

 You can see the same error as follows:

 1.  Install sandwich, but don't attach it or zoo.

 2.  Run

 example(glm)

 to create the glm object glm.D93.

 Try to call

 sandwich::estfun(glm.D93)

 You'll get the same error as before because is.zoo() will not be loaded.

 It's also arguably a design flaw in R.  For testing sandwich, zoo would
 generally end up being attached, because the testing of sandwich would
 attach it.  However, examples like the one above are never tested.

 Duncan Murdoch

 __
 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] should dir(all=TRUE) return . and ..?

2011-09-23 Thread Martin Maechler
 William Dunlap wdun...@tibco.com
 on Fri, 23 Sep 2011 15:49:43 + writes:

 dir(all=TRUE) returns the file names . and ..  while
 dir(recursive=TRUE, all=TRUE, include.dirs=TRUE) does not.
 I always filter out the . and .. entries and was
 wondering if anyone would mind if dir(all=TRUE) just
 omitted them?  It might make recursive file operations
 like cleaning out a directory safer, as
 unlink(recursive=TRUE, dir(all=TRUE, dirToClean)) might
 start attacking dirToClean/.., then dirToClean/../..,
 etc., until your disk is empty.

 :-)

Thank you, Bill.
I agree that there is a problem.  It seems wrong to me that 

   dir(all.files=TRUE, recursive=TRUE, include.dirs=TRUE)

*omits* the (symbolic) directories  '.' and '..'  when simple

   dir(all.files=TRUE)

includes them.

However, from a strict description (of the argument names, and
also the help file) I would have expected that both would *include* 
rather than omit them.
But then --the scenario abov, and also more general
reasoning -- would rather suggest to follow your proposal.

Martin


 dir.create(tdir - tempfile(tdir))
 file.create(file.path(tdir, c(.dotFile, noDotFile)))
   [1] TRUE TRUE
 dir.create(file.path(tdir, .dotDir))
 file.create(file.path(tdir, .dotDir,
 c(noDotFileInDotDir, .dotFileInDotDir)))
   [1] TRUE TRUE
 dir(tdir, all=TRUE) # omit . and .. here?
   [1] .  ..  .dotDir .dotFile [5] noDotFile
 dir(tdir, all=TRUE, recursive=TRUE, include.dirs=TRUE)
   [1] .dotDir .dotDir/.dotFileInDotDir [3]
 .dotDir/noDotFileInDotDir .dotFile [5] noDotFile

 Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com

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


Re: [Rd] Issue with seek() on gzipped connections in R-devel

2011-09-23 Thread Prof Brian Ripley

On Fri, 23 Sep 2011, Jon Clayden wrote:


Thanks for the replies. I take the point, although it does seem like a
substantial regression (on non-Windows platforms).

I like to keep the external dependencies of my packages minimal, but I
will look into the mmap package - thanks, Jeff, for the tip.

Aside from that, though, what is the alternative to using seek? If I
want to read something at (original, uncompressed) byte offset 352, as
here, do I have to read and discard everything that comes before it
first? That seems inelegant at best...


Or uncompress the file.



Regards,
Jon


On 23 September 2011 16:54, Jeffrey Ryan jeffrey.r...@lemnica.com wrote:

seek() in general is a bad idea IMO if you are writing cross-platform code.

?seek

Warning:

    Use of ‘seek’ on Windows is discouraged.  We have found so many
    errors in the Windows implementation of file positioning that
    users are advised to use it only at their own risk, and asked not
    to waste the R developers' time with bug reports on Windows'
    deficiencies.

Aside from making me laugh, the above highlights the core reason to not use IMO.

For not zipped files, you can try the mmap package.  ?mmap and ?types
are good starting points.  Allows for accessing binary data on disk
with very simple R-like semantics, and is very fast.  Not as fast as a
sequential read... but fast.  At present this is 'little endian' only
though, but that describes most of the world today.

Best,
Jeff

On Fri, Sep 23, 2011 at 8:58 AM, Jon Clayden jon.clay...@gmail.com wrote:

Dear all,

In R-devel (2011-09-23 r57050), I'm running into a serious problem
with seek()ing on connections opened with gzfile(). A warning is
generated and the file position does not seek to the requested
location. It doesn't seem to occur all the time - I tried to create a
small example file to illustrate it, but the problem didn't occur.
However, it can be seen with a file I use for testing my packages,
which is available through the URL
https://github.com/jonclayden/tractor/blob/master/tests/data/nifti/maskedb0_lia.nii.gz?raw=true:


con - gzfile(~/Downloads/maskedb0_lia.nii.gz,rb)
seek(con, 352)

[1] 0
Warning message:
In seek.connection(con, 352) :
 seek on a gzfile connection returned an internal error

seek(con, NA)

[1] 190

The same commands with the same file work as expected in R 2.13.1, and
have worked over many previous versions of R.


con - gzfile(~/Downloads/maskedb0_lia.nii.gz,rb)
seek(con, 352)

[1] 0

seek(con, NA)

[1] 352

My sessionInfo() output is:

R Under development (unstable) (2011-09-23 r57050)
Platform: x86_64-apple-darwin11.1.0 (64-bit)

locale:
[1] en_GB.UTF-8/en_US.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages:
[1] splines   stats     graphics  grDevices utils     datasets  methods
[8] base

other attached packages:
[1] tractor.nt_2.0.1      tractor.session_2.0.3 tractor.utils_2.0.0
[4] tractor.base_2.0.3    reportr_0.2.0

This seems to occur whether or not R is compiled with
--with-system-zlib. I see some zlib-related changes mentioned in the
NEWS, but I don't see any indication that this is expected. Could
anyone shed any light on it, please?

Thanks and all the best,
Jon

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





--
Jeffrey Ryan
jeffrey.r...@lemnica.com

www.lemnica.com
www.esotericR.com



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



--
Brian D. Ripley,  rip...@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] should dir(all=TRUE) return . and ..?

2011-09-23 Thread Prof Brian Ripley

On Fri, 23 Sep 2011, Martin Maechler wrote:


William Dunlap wdun...@tibco.com
on Fri, 23 Sep 2011 15:49:43 + writes:


dir(all=TRUE) returns the file names . and ..  while
dir(recursive=TRUE, all=TRUE, include.dirs=TRUE) does not.
I always filter out the . and .. entries and was
wondering if anyone would mind if dir(all=TRUE) just
omitted them?  It might make recursive file operations
like cleaning out a directory safer, as
unlink(recursive=TRUE, dir(all=TRUE, dirToClean)) might
start attacking dirToClean/.., then dirToClean/../..,
etc., until your disk is empty.

:-)

Thank you, Bill.
I agree that there is a problem.  It seems wrong to me that

  dir(all.files=TRUE, recursive=TRUE, include.dirs=TRUE)

*omits* the (symbolic) directories  '.' and '..'  when simple

  dir(all.files=TRUE)

includes them.


It was intentional.  The authors of that part wanted it that way, the 
original author of list.files (aka dir) wanted this the way it was 
before include.dirs was added.



However, from a strict description (of the argument names, and
also the help file) I would have expected that both would *include*
rather than omit them.
But then --the scenario abov, and also more general
reasoning -- would rather suggest to follow your proposal.


Someone would need to check for back-compatibility though: 
list.files() has been around for a long time.


There are lots of odder things about list.files(), for example that it 
lists directories with recursive=FALSE and not with recursive=TRUE. 
So is a directory a file or not?



Martin


dir.create(tdir - tempfile(tdir))
file.create(file.path(tdir, c(.dotFile, noDotFile)))
  [1] TRUE TRUE
dir.create(file.path(tdir, .dotDir))
file.create(file.path(tdir, .dotDir,
c(noDotFileInDotDir, .dotFileInDotDir)))
  [1] TRUE TRUE
dir(tdir, all=TRUE) # omit . and .. here?
  [1] .  ..  .dotDir .dotFile [5] noDotFile
dir(tdir, all=TRUE, recursive=TRUE, include.dirs=TRUE)
  [1] .dotDir .dotDir/.dotFileInDotDir [3]
.dotDir/noDotFileInDotDir .dotFile [5] noDotFile

Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com

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



--
Brian D. Ripley,  rip...@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

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


[Rd] broken save(..., compress=xy)

2011-09-23 Thread Hervé Pagès

Hi,

With current R devel and R 2.13.1:

 aa=1:5
 save(aa, file=aa.rda, compress=xy)
Error in identical(compress, gzip) || compress :
  invalid 'y' type in 'x || y'

Thanks!
H.

 sessionInfo()
R version 2.13.1 (2011-07-08)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_CA.UTF-8   LC_NUMERIC=C
 [3] LC_TIME=en_CA.UTF-8LC_COLLATE=en_CA.UTF-8
 [5] LC_MONETARY=C  LC_MESSAGES=en_CA.UTF-8
 [7] LC_PAPER=en_CA.UTF-8   LC_NAME=C
 [9] LC_ADDRESS=C   LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base


--
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpa...@fhcrc.org
Phone:  (206) 667-5791
Fax:(206) 667-1319

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


Re: [Rd] broken save(..., compress=xy)

2011-09-23 Thread Sarah Goslee
Hi,


2011/9/23 Hervé Pagès hpa...@fhcrc.org:
 Hi,

 With current R devel and R 2.13.1:

 aa=1:5
 save(aa, file=aa.rda, compress=xy)
 Error in identical(compress, gzip) || compress :
  invalid 'y' type in 'x || y'

The options for compress are gzip bzip2 or xz (and not xy), at
least on my linux system. Are you sure you want xy?

Sarah

 Thanks!
 H.

 sessionInfo()
 R version 2.13.1 (2011-07-08)
 Platform: x86_64-unknown-linux-gnu (64-bit)

 locale:
  [1] LC_CTYPE=en_CA.UTF-8       LC_NUMERIC=C
  [3] LC_TIME=en_CA.UTF-8        LC_COLLATE=en_CA.UTF-8
  [5] LC_MONETARY=C              LC_MESSAGES=en_CA.UTF-8
  [7] LC_PAPER=en_CA.UTF-8       LC_NAME=C
  [9] LC_ADDRESS=C               LC_TELEPHONE=C
 [11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C

 attached base packages:
 [1] stats     graphics  grDevices utils     datasets  methods   base


 --


-- 
Sarah Goslee
http://www.functionaldiversity.org

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


Re: [Rd] broken save(..., compress=xy)

2011-09-23 Thread Hervé Pagès

On 11-09-23 11:02 AM, Sarah Goslee wrote:

Hi,


2011/9/23 Hervé Pagèshpa...@fhcrc.org:

Hi,

With current R devel and R 2.13.1:


aa=1:5
save(aa, file=aa.rda, compress=xy)

Error in identical(compress, gzip) || compress :
  invalid 'y' type in 'x || y'


The options for compress are gzip bzip2 or xz (and not xy), at
least on my linux system. Are you sure you want xy?


Right, I wanted xz, sorry... Maybe error handling could be improved
though so a typo in the input doesn't break the code?

Thanks,
H.



Sarah


Thanks!
H.


sessionInfo()

R version 2.13.1 (2011-07-08)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
  [1] LC_CTYPE=en_CA.UTF-8   LC_NUMERIC=C
  [3] LC_TIME=en_CA.UTF-8LC_COLLATE=en_CA.UTF-8
  [5] LC_MONETARY=C  LC_MESSAGES=en_CA.UTF-8
  [7] LC_PAPER=en_CA.UTF-8   LC_NAME=C
  [9] LC_ADDRESS=C   LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base


--






--
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpa...@fhcrc.org
Phone:  (206) 667-5791
Fax:(206) 667-1319

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


Re: [Rd] could not find function after import

2011-09-23 Thread Duncan Murdoch

On 23/09/2011 12:57 PM, steven mosher wrote:

Duncan

I have a related question.

I need one function from R.utils.  But R.utils depends on R.oo and  R.methodsS3.
so I made R.util an import and then used importFrom() in the namespace.

The package passed the  check.  However when it came to use the function
it had not been loaded? do I need to add the upstream packages that
R.util  depends
upon?  also in the code do I need a library or require?


Sounds exactly like the situation with sandwich below.The workaround 
available to you is to Depend on R.utils.  The author of R.utils could 
fix the problem by importing R.oo and R.methodsS3, and the authors of R 
could fix it by changing the behaviour of how R handles imports.


Duncan Murdoch


A bit confused

Steve

On Mon, Sep 19, 2011 at 5:09 PM, Duncan Murdoch
murdoch.dun...@gmail.com  wrote:
  On 11-09-19 4:48 PM, Stephanie M. Gogarten wrote:

  I am trying to build a package (GWASTools, submitted to Bioconductor)
  that uses the sandwich package.  I have references to sandwich in
  DESCRIPTION:
  Imports: methods, DBI, RSQLite, sandwich, survival, DNAcopy

  and NAMESPACE:
  import(sandwich)

  In the code itself is a call to vcovHC:
  Vhat- vcovHC(mod, type=HC0)

  I have sandwich version 2.2-7 installed.

  When I run R CMD check on my package, I get the following error during
  checking of examples:
  * using R Under development (unstable) (2011-08-29 r56828)
  * using platform: x86_64-apple-darwin9.8.0 (64-bit)
  ...
  * checking examples ... ERROR
  ...
  Error in estfun.glm(x) : could not find function is.zoo
  Calls: assocTestRegression ... meatHC -rowMeans -is.data.frame -
  estfun -estfun.glm

  I import sandwich, sandwich depends on zoo, but a function in zoo cannot
  be found during execution.

  I tried to get around this by explicitly including a require statement
  in assocTestRegression:
  require(sandwich)

  The example now runs, but I have a warning in R CMD check:
  * checking for unstated dependencies in R code ... WARNING
  ‘library’ or ‘require’ call not declared from: ‘sandwich’

  I am not sure why this is a problem, as there is a require statement
  (for a different package) in another function which does not cause any
  warnings.

  Can anyone advise on how to get my package to successfully pass R CMD
  check?


  If you said that your package Depends on sandwich, you'd probably pass
  checks, but this is arguably a bug in the sandwich package.

  The problem is that since you only import sandwich, it never gets attached.
So it never attaches its dependency zoo.   It should import zoo (or import
  the functions in zoo that it uses) to work properly the way you are calling
  it.

  You can see the same error as follows:

  1.  Install sandwich, but don't attach it or zoo.

  2.  Run

  example(glm)

  to create the glm object glm.D93.

  Try to call

  sandwich::estfun(glm.D93)

  You'll get the same error as before because is.zoo() will not be loaded.

  It's also arguably a design flaw in R.  For testing sandwich, zoo would
  generally end up being attached, because the testing of sandwich would
  attach it.  However, examples like the one above are never tested.

  Duncan Murdoch

  __
  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] could not find function after import

2011-09-23 Thread steven mosher
Thanks duncan.

I fixed it by changing to depends and resubmitting my packages.  But I
changed from depends to imports for a very specific reason. namespace
conflicts. There are work arounds for that so its not terminally
broken, but  IMPORT had the promise of just the elegance I was looking
for.

Thanks for the explanation.

Steve



On Fri, Sep 23, 2011 at 11:44 AM, Duncan Murdoch
murdoch.dun...@gmail.com wrote:
 On 23/09/2011 12:57 PM, steven mosher wrote:

 Duncan

 I have a related question.

 I need one function from R.utils.  But R.utils depends on R.oo and
  R.methodsS3.
 so I made R.util an import and then used importFrom() in the namespace.

 The package passed the  check.  However when it came to use the function
 it had not been loaded? do I need to add the upstream packages that
 R.util  depends
 upon?  also in the code do I need a library or require?

 Sounds exactly like the situation with sandwich below.    The workaround
 available to you is to Depend on R.utils.  The author of R.utils could fix
 the problem by importing R.oo and R.methodsS3, and the authors of R could
 fix it by changing the behaviour of how R handles imports.

 Duncan Murdoch

 A bit confused

 Steve

 On Mon, Sep 19, 2011 at 5:09 PM, Duncan Murdoch
 murdoch.dun...@gmail.com  wrote:
   On 11-09-19 4:48 PM, Stephanie M. Gogarten wrote:
 
   I am trying to build a package (GWASTools, submitted to Bioconductor)
   that uses the sandwich package.  I have references to sandwich in
   DESCRIPTION:
   Imports: methods, DBI, RSQLite, sandwich, survival, DNAcopy
 
   and NAMESPACE:
   import(sandwich)
 
   In the code itself is a call to vcovHC:
   Vhat- vcovHC(mod, type=HC0)
 
   I have sandwich version 2.2-7 installed.
 
   When I run R CMD check on my package, I get the following error during
   checking of examples:
   * using R Under development (unstable) (2011-08-29 r56828)
   * using platform: x86_64-apple-darwin9.8.0 (64-bit)
   ...
   * checking examples ... ERROR
   ...
   Error in estfun.glm(x) : could not find function is.zoo
   Calls: assocTestRegression ... meatHC -    rowMeans -
   is.data.frame -
   estfun -    estfun.glm
 
   I import sandwich, sandwich depends on zoo, but a function in zoo
  cannot
   be found during execution.
 
   I tried to get around this by explicitly including a require
  statement
   in assocTestRegression:
   require(sandwich)
 
   The example now runs, but I have a warning in R CMD check:
   * checking for unstated dependencies in R code ... WARNING
   ‘library’ or ‘require’ call not declared from: ‘sandwich’
 
   I am not sure why this is a problem, as there is a require statement
   (for a different package) in another function which does not cause any
   warnings.
 
   Can anyone advise on how to get my package to successfully pass R CMD
   check?
 
 
   If you said that your package Depends on sandwich, you'd probably pass
   checks, but this is arguably a bug in the sandwich package.
 
   The problem is that since you only import sandwich, it never gets
  attached.
     So it never attaches its dependency zoo.   It should import zoo (or
  import
   the functions in zoo that it uses) to work properly the way you are
  calling
   it.
 
   You can see the same error as follows:
 
   1.  Install sandwich, but don't attach it or zoo.
 
   2.  Run
 
   example(glm)
 
   to create the glm object glm.D93.
 
   Try to call
 
   sandwich::estfun(glm.D93)
 
   You'll get the same error as before because is.zoo() will not be
  loaded.
 
   It's also arguably a design flaw in R.  For testing sandwich, zoo would
   generally end up being attached, because the testing of sandwich would
   attach it.  However, examples like the one above are never tested.
 
   Duncan Murdoch
 
   __
   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


[Rd] cbind() crashes on raw vectors

2011-09-23 Thread Hervé Pagès

Hi,

cbind() doesn't seem to like raw vectors:

 df - cbind(a=integer(4000), b=raw(4000))
 df
*** glibc detected *** /home/hpages/R-2.13.1/bin/exec/R: malloc(): 
memory corruption: 0x02d73ca0 ***

=== Backtrace: =
/lib/x86_64-linux-gnu/libc.so.6(+0x79d7a)[0x7f3592b91d7a]
/lib/x86_64-linux-gnu/libc.so.6(__libc_malloc+0x6e)[0x7f3592b9431e]
/lib/libreadline.so.5(xmalloc+0x6)[0x7f3592620ab6]
/lib/libreadline.so.5(add_history+0xbe)[0x7f359262136e]
/home/hpages/R-2.13.1/lib/libR.so(+0x1b6538)[0x7f35936bd538]
/lib/libreadline.so.5(rl_callback_read_char+0x8c)[0x7f359261cb1c]
/home/hpages/R-2.13.1/lib/libR.so(+0x1b6f74)[0x7f35936bdf74]
/home/hpages/R-2.13.1/lib/libR.so(Rf_ReplIteration+0xe7)[0x7f3593610eb7]
/home/hpages/R-2.13.1/lib/libR.so(+0x10a260)[0x7f3593611260]
/home/hpages/R-2.13.1/lib/libR.so(run_Rmainloop+0x50)[0x7f3593611780]
/home/hpages/R-2.13.1/bin/exec/R(main+0x1b)[0x40085b]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xff)[0x7f3592b36eff]
/home/hpages/R-2.13.1/bin/exec/R[0x400779]
=== Memory map: 
0040-00401000 r-xp  08:01 3811201 
 /home/hpages/R-2.13.1/bin/exec/R
0060-00601000 r--p  08:01 3811201 
 /home/hpages/R-2.13.1/bin/exec/R
00601000-00602000 rw-p 1000 08:01 3811201 
 /home/hpages/R-2.13.1/bin/exec/R
02583000-03b16000 rw-p  00:00 0 
 [heap]

7f358c00-7f358c021000 rw-p  00:00 0
7f358c021000-7f359000 ---p  00:00 0
7f3590342000-7f3590357000 r-xp  08:06 8155 
 /lib/x86_64-linux-gnu/libgcc_s.so.1
7f3590357000-7f3590556000 ---p 00015000 08:06 8155 
 /lib/x86_64-linux-gnu/libgcc_s.so.1
7f3590556000-7f3590557000 r--p 00014000 08:06 8155 
 /lib/x86_64-linux-gnu/libgcc_s.so.1
7f3590557000-7f3590558000 rw-p 00015000 08:06 8155 
 /lib/x86_64-linux-gnu/libgcc_s.so.1
7f3590558000-7f35905c4000 r-xp  08:01 3818237 
 /home/hpages/R-2.13.1/library/stats/libs/stats.so
7f35905c4000-7f35907c3000 ---p 0006c000 08:01 3818237 
 /home/hpages/R-2.13.1/library/stats/libs/stats.so
7f35907c3000-7f35907c5000 r--p 0006b000 08:01 3818237 
 /home/hpages/R-2.13.1/library/stats/libs/stats.so
7f35907c5000-7f35907c7000 rw-p 0006d000 08:01 3818237 
 /home/hpages/R-2.13.1/library/stats/libs/stats.so

7f35907c7000-7f359083a000 rw-p  00:00 0
7f359083a000-7f359085c000 r-xp  08:01 3817784 
 /home/hpages/R-2.13.1/library/grDevices/libs/grDevices.so
7f359085c000-7f3590a5b000 ---p 00022000 08:01 3817784 
 /home/hpages/R-2.13.1/library/grDevices/libs/grDevices.so
7f3590a5b000-7f3590a5c000 r--p 00021000 08:01 3817784 
 /home/hpages/R-2.13.1/library/grDevices/libs/grDevices.so
7f3590a5c000-7f3590a5d000 rw-p 00022000 08:01 3817784 
 /home/hpages/R-2.13.1/library/grDevices/libs/grDevices.so
7f3590b61000-7f3590b63000 r-xp  08:07 671027 
 /usr/lib/x86_64-linux-gnu/gconv/ISO8859-1.so
7f3590b63000-7f3590d62000 ---p 2000 08:07 671027 
 /usr/lib/x86_64-linux-gnu/gconv/ISO8859-1.so
7f3590d62000-7f3590d63000 r--p 1000 08:07 671027 
 /usr/lib/x86_64-linux-gnu/gconv/ISO8859-1.so
7f3590d63000-7f3590d64000 rw-p 2000 08:07 671027 
 /usr/lib/x86_64-linux-gnu/gconv/ISO8859-1.so

7f3590d64000-7f3590de6000 rw-p  00:00 0
7f3590de6000-7f3590ded000 r-xp  08:01 3818288 
 /home/hpages/R-2.13.1/library/methods/libs/methods.so
7f3590ded000-7f3590fec000 ---p 7000 08:01 3818288 
 /home/hpages/R-2.13.1/library/methods/libs/methods.so
7f3590fec000-7f3590fed000 r--p 6000 08:01 3818288 
 /home/hpages/R-2.13.1/library/methods/libs/methods.so
7f3590fed000-7f3590fee000 rw-p 7000 08:01 3818288 
 /home/hpages/R-2.13.1/library/methods/libs/methods.so
7f3590fee000-7f3590ffa000 r-xp  08:06 8319 
 /lib/x86_64-linux-gnu/libnss_files-2.13.so
7f3590ffa000-7f35911f9000 ---p c000 08:06 8319 
 /lib/x86_64-linux-gnu/libnss_files-2.13.so
7f35911f9000-7f35911fa000 r--p b000 08:06 8319 
 /lib/x86_64-linux-gnu/libnss_files-2.13.so
7f35911fa000-7f35911fb000 rw-p c000 08:06 8319 
 /lib/x86_64-linux-gnu/libnss_files-2.13.so
7f35911fb000-7f3591206000 r-xp  08:06 8321 
 /lib/x86_64-linux-gnu/libnss_nis-2.13.so
7f3591206000-7f3591405000 ---p b000 08:06 8321 
 /lib/x86_64-linux-gnu/libnss_nis-2.13.so
7f3591405000-7f3591406000 r--p a000 08:06 8321 
 /lib/x86_64-linux-gnu/libnss_nis-2.13.so
7f3591406000-7f3591407000 rw-p b000 08:06 8321 
 /lib/x86_64-linux-gnu/libnss_nis-2.13.so
7f3591407000-7f359141e000 r-xp  08:06 8316 
 /lib/x86_64-linux-gnu/libnsl-2.13.so
7f359141e000-7f359161d000 ---p 00017000 08:06 8316 
 /lib/x86_64-linux-gnu/libnsl-2.13.so
7f359161d000-7f359161e000 r--p 00016000 08:06 8316 
 /lib/x86_64-linux-gnu/libnsl-2.13.so
7f359161e000-7f359161f000 rw-p 00017000 08:06 8316 
 /lib/x86_64-linux-gnu/libnsl-2.13.so

7f359161f000-7f3591621000 rw-p  00:00 0
7f3591621000-7f3591629000 r-xp  08:06 8317 
 /lib/x86_64-linux-gnu/libnss_compat-2.13.so
7f3591629000-7f3591828000 ---p 8000 08:06 8317 
 /lib/x86_64-linux-gnu/libnss_compat-2.13.so

[Rd] inconsolata font for building vignettes with R-devel

2011-09-23 Thread Ben Bolker
  Just to save someone else a few seconds of googling: when you try to R
CMD check with recent versions of R-devel and you get

* checking PDF version of manual ... WARNING
LaTeX errors when creating PDF version.
This typically indicates Rd problems.
LaTeX errors found:
! LaTeX Error: File `inconsolata.sty' not found.

 the Debian/Ubuntu solution is:

sudo apt-get install texlive-fonts-extra

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


Re: [Rd] inconsolata font for building vignettes with R-devel

2011-09-23 Thread Dirk Eddelbuettel

On 23 September 2011 at 18:03, Ben Bolker wrote:
|   Just to save someone else a few seconds of googling: when you try to R
| CMD check with recent versions of R-devel and you get
| 
| * checking PDF version of manual ... WARNING
| LaTeX errors when creating PDF version.
| This typically indicates Rd problems.
| LaTeX errors found:
| ! LaTeX Error: File `inconsolata.sty' not found.
| 
|  the Debian/Ubuntu solution is:
| 
| sudo apt-get install texlive-fonts-extra

Odd.  I just built the R 2.13.2 release candidate this morning.  My
Build-Depends list is 

   Build-Depends: gcc (= 4:4.1.0), g++ (= 4:4.1.0), gfortran (= 4:4.1.0),
 libblas-dev, liblapack-dev (= 3.1.1), tcl8.5-dev, tk8.5-dev, bison,
 groff-base, libncurses5-dev, libreadline-dev, debhelper (= 7.2.3),
 texi2html, texinfo (= 4.1-2), libbz2-dev, liblzma-dev, libpcre3-dev,
 xdg-utils, zlib1g-dev, libpng12-dev, libjpeg-dev, libx11-dev, libxt-dev,
 x11proto-core-dev, libpango1.0-dev, libcairo2-dev, libtiff4-dev, xvfb,
 xauth, xfonts-base, texlive-base, texlive-latex-base,
 texlive-generic-recommended, texlive-fonts-recommended,
 texlive-extra-utils, texlive-latex-recommended, texlive-latex-extra,
 texinfo, texi2html, openjdk-6-jdk [!arm !hppa !kfreebsd-i386
 !kfreebsd-amd64 !hurd-i386 !mips] 

which has texlive-fonts-recommended but t-f-extra as you suggest. Seems not
to have any side effects:

edd@max:~$ wc -l src/debian/build-logs/r-base_2.13.2~20110922-1.log 
17147 src/debian/build-logs/r-base_2.13.2~20110922-1.log
edd@max:~$ 

So is there a safe fallback or not?  Should I install texlive-fonts-extra too
when building?

Dirk

-- 
New Rcpp master class for R and C++ integration is scheduled for 
San Francisco (Oct 8), more details / reg.info available at
http://www.revolutionanalytics.com/products/training/public/rcpp-master-class.php

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


Re: [Rd] inconsolata font for building vignettes with R-devel

2011-09-23 Thread Ben Bolker
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 09/23/2011 06:25 PM, Dirk Eddelbuettel wrote:
 
 On 23 September 2011 at 18:03, Ben Bolker wrote:
 |   Just to save someone else a few seconds of googling: when you try to R
 | CMD check with recent versions of R-devel and you get
 | 
 | * checking PDF version of manual ... WARNING
 | LaTeX errors when creating PDF version.
 | This typically indicates Rd problems.
 | LaTeX errors found:
 | ! LaTeX Error: File `inconsolata.sty' not found.
 | 
 |  the Debian/Ubuntu solution is:
 | 
 | sudo apt-get install texlive-fonts-extra
 
 Odd.  I just built the R 2.13.2 release candidate this morning.  My
 Build-Depends list is 
 
Build-Depends: gcc (= 4:4.1.0), g++ (= 4:4.1.0), gfortran (= 4:4.1.0),
  libblas-dev, liblapack-dev (= 3.1.1), tcl8.5-dev, tk8.5-dev, bison,
  groff-base, libncurses5-dev, libreadline-dev, debhelper (= 7.2.3),
  texi2html, texinfo (= 4.1-2), libbz2-dev, liblzma-dev, libpcre3-dev,
  xdg-utils, zlib1g-dev, libpng12-dev, libjpeg-dev, libx11-dev, libxt-dev,
  x11proto-core-dev, libpango1.0-dev, libcairo2-dev, libtiff4-dev, xvfb,
  xauth, xfonts-base, texlive-base, texlive-latex-base,
  texlive-generic-recommended, texlive-fonts-recommended,
  texlive-extra-utils, texlive-latex-recommended, texlive-latex-extra,
  texinfo, texi2html, openjdk-6-jdk [!arm !hppa !kfreebsd-i386
  !kfreebsd-amd64 !hurd-i386 !mips] 
 
 which has texlive-fonts-recommended but t-f-extra as you suggest. Seems not
 to have any side effects:
 
 edd@max:~$ wc -l src/debian/build-logs/r-base_2.13.2~20110922-1.log 
 17147 src/debian/build-logs/r-base_2.13.2~20110922-1.log
 edd@max:~$ 
 
 So is there a safe fallback or not?  Should I install texlive-fonts-extra too
 when building?
 
 Dirk

  I'm on 10.04 LTS which might have something to do with it ... maybe
texlive-latex-recommended is a different/older version with less stuff
in it?  (Maybe )



 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOfQfgAAoJED2whTVMEyK9GB0H/2gy7aaGeogtbwT6xDJEqV2G
qDeS8/xDS4gXlXm1mXucLcgVyz9GwpT75YfKdGVJTH5m9EDXyeM13I+SyC87VL37
T/g9rIGo4PyqqqipGKO7MRKd799igr6uv+Ua/mzkyWkNptyHZNVwxSgk35GQD6cp
l+F6h0a4L6l11dR+HwjtfyRXC8io+/aRF1WlEmfZjwr5P8/soQTDpawi0SSpWrCa
Rh32fHE0X2RKiXevrN0yscSRTD7PR3ZdEcqThiKK/6xxF/HM6AW0CD+xVbxpoAz8
3ftXpKCik7z/23tzbskVjuASvvdYWwFGSQiULFS+xOm/aCLrjt/W2RmWlw4Y2C4=
=jpMf
-END PGP SIGNATURE-

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


Re: [Rd] broken save(..., compress=xy)

2011-09-23 Thread Martin Maechler
 Hervé Pagès hpa...@fhcrc.org
 on Fri, 23 Sep 2011 11:44:32 -0700 writes:

 On 11-09-23 11:02 AM, Sarah Goslee wrote:
 Hi,
 
 
 2011/9/23 Hervé Pagèshpa...@fhcrc.org:
 Hi,
 
 With current R devel and R 2.13.1:
 
 aa=1:5 save(aa, file=aa.rda, compress=xy)
 Error in identical(compress, gzip) || compress :
 invalid 'y' type in 'x || y'
 
 The options for compress are gzip bzip2 or xz (and
 not xy), at least on my linux system. Are you sure you
 want xy?

 Right, I wanted xz, sorry... Maybe error handling could
 be improved though so a typo in the input doesn't break
 the code?

well, what every  ' break the code '  means,
you are right that a more informative error message makes sense
here (though, the code now is slightly longer).
I've committed such a change {svn rev 57057}.

Martin

 Thanks, H.

 
 Sarah
 
 Thanks!  H.
 
 sessionInfo()
 R version 2.13.1 (2011-07-08) Platform:
 x86_64-unknown-linux-gnu (64-bit)
 
 locale: [1] LC_CTYPE=en_CA.UTF-8 LC_NUMERIC=C [3]
 LC_TIME=en_CA.UTF-8 LC_COLLATE=en_CA.UTF-8 [5]
 LC_MONETARY=C LC_MESSAGES=en_CA.UTF-8 [7]
 LC_PAPER=en_CA.UTF-8 LC_NAME=C [9] LC_ADDRESS=C
 LC_TELEPHONE=C [11] LC_MEASUREMENT=en_CA.UTF-8
 LC_IDENTIFICATION=C
 
 attached base packages: [1] stats graphics grDevices
 utils datasets methods base
 
 
 --
 



-- 
Hervé Pagès

 Program in Computational Biology Division of Public Health
 Sciences Fred Hutchinson Cancer Research Center 1100
 Fairview Ave. N, M1-B514 P.O. Box 19024 Seattle, WA
 98109-1024

 E-mail: hpa...@fhcrc.org Phone: (206) 667-5791 Fax: (206)
 667-1319

 __
 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] cbind() crashes on raw vectors

2011-09-23 Thread Martin Morgan

On 09/23/2011 01:46 PM, Hervé Pagès wrote:

Hi,

cbind() doesn't seem to like raw vectors:

  df - cbind(a=integer(4000), b=raw(4000))
  df
*** glibc detected *** /home/hpages/R-2.13.1/bin/exec/R: malloc():
memory corruption: 0x02d73ca0 ***


For what it's worth, under valgrind

R -d valgrind -e df - cbind(a=integer(4000), b=raw(4000)) 
==19446== Memcheck, a memory error detector
==19446== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==19446== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info
==19446== Command: /home/mtmorgan/bin/R-devel/bin/exec/R --no-save 
--quiet -e df~+~\-~+~cbind(a=integer(4000),~+~b=raw(4000))~+~

==19446==
 df - cbind(a=integer(4000), b=raw(4000))
==19446== Invalid write of size 8
==19446==at 0x4E8C488: cbind (bind.c:1318)
==19446==by 0x4E8B910: do_bind (bind.c:1117)
==19446==by 0x4F77460: do_internal (names.c:1229)
==19446==by 0x4F14543: Rf_eval (eval.c:469)
==19446==by 0x4F154EC: Rf_applyClosure (eval.c:838)
==19446==by 0x4F14856: Rf_eval (eval.c:513)
==19446==by 0x4F17F19: do_set (eval.c:1724)
==19446==by 0x4F14543: Rf_eval (eval.c:469)
==19446==by 0x4F5D0A8: Rf_ReplIteration (main.c:255)
==19446==by 0x4F5D295: R_ReplConsole (main.c:304)
==19446==by 0x4F5E8F4: run_Rmainloop (main.c:985)
==19446==by 0x4F5E909: Rf_mainloop (main.c:992)
==19446==  Address 0x8253298 is 0 bytes after a block of size 32,040 alloc'd
==19446==at 0x4C26C3A: malloc (in 
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)


and at bind.c:1306:1319

if (TYPEOF(u) = INTSXP) {
if (mode = INTSXP) {
for (i = 0; i  idx; i++)
INTEGER(result)[n++] = INTEGER(u)[i % k];
}
else {
for (i = 0; i  idx; i++)
			REAL(result)[n++] = (INTEGER(u)[i % k]) == NA_INTEGER ? NA_REAL : 
INTEGER(u)[i % k];

}
}
else {
for (i = 0; i  idx; i++)
REAL(result)[n++] = REAL(u)[i % k];
}

we end up writing REAL(result)[n++] = REAL(u)[i % k] even though

 (gdb) p TYPEOF(u)
$15 = 24

i.e., RAWSXP

(gdb) p TYPEOF(result)
$16 = 13

i.e., INTSXP

it's because the test TYPEOF(u) = INTSXP fails bind.c:1306.

Martin

 sessionInfo()
R Under development (unstable) (2011-09-19 r57030)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8   LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=C LC_NAME=C
 [9] LC_ADDRESS=C   LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base



=== Backtrace: =
/lib/x86_64-linux-gnu/libc.so.6(+0x79d7a)[0x7f3592b91d7a]
/lib/x86_64-linux-gnu/libc.so.6(__libc_malloc+0x6e)[0x7f3592b9431e]
/lib/libreadline.so.5(xmalloc+0x6)[0x7f3592620ab6]
/lib/libreadline.so.5(add_history+0xbe)[0x7f359262136e]
/home/hpages/R-2.13.1/lib/libR.so(+0x1b6538)[0x7f35936bd538]
/lib/libreadline.so.5(rl_callback_read_char+0x8c)[0x7f359261cb1c]
/home/hpages/R-2.13.1/lib/libR.so(+0x1b6f74)[0x7f35936bdf74]
/home/hpages/R-2.13.1/lib/libR.so(Rf_ReplIteration+0xe7)[0x7f3593610eb7]
/home/hpages/R-2.13.1/lib/libR.so(+0x10a260)[0x7f3593611260]
/home/hpages/R-2.13.1/lib/libR.so(run_Rmainloop+0x50)[0x7f3593611780]
/home/hpages/R-2.13.1/bin/exec/R(main+0x1b)[0x40085b]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xff)[0x7f3592b36eff]
/home/hpages/R-2.13.1/bin/exec/R[0x400779]
=== Memory map: 
0040-00401000 r-xp  08:01 3811201
/home/hpages/R-2.13.1/bin/exec/R
0060-00601000 r--p  08:01 3811201
/home/hpages/R-2.13.1/bin/exec/R
00601000-00602000 rw-p 1000 08:01 3811201
/home/hpages/R-2.13.1/bin/exec/R
02583000-03b16000 rw-p  00:00 0 [heap]
7f358c00-7f358c021000 rw-p  00:00 0
7f358c021000-7f359000 ---p  00:00 0
7f3590342000-7f3590357000 r-xp  08:06 8155
/lib/x86_64-linux-gnu/libgcc_s.so.1
7f3590357000-7f3590556000 ---p 00015000 08:06 8155
/lib/x86_64-linux-gnu/libgcc_s.so.1
7f3590556000-7f3590557000 r--p 00014000 08:06 8155
/lib/x86_64-linux-gnu/libgcc_s.so.1
7f3590557000-7f3590558000 rw-p 00015000 08:06 8155
/lib/x86_64-linux-gnu/libgcc_s.so.1
7f3590558000-7f35905c4000 r-xp  08:01 3818237
/home/hpages/R-2.13.1/library/stats/libs/stats.so
7f35905c4000-7f35907c3000 ---p 0006c000 08:01 3818237
/home/hpages/R-2.13.1/library/stats/libs/stats.so
7f35907c3000-7f35907c5000 r--p 0006b000 08:01 3818237
/home/hpages/R-2.13.1/library/stats/libs/stats.so
7f35907c5000-7f35907c7000 rw-p 0006d000 08:01 3818237
/home/hpages/R-2.13.1/library/stats/libs/stats.so
7f35907c7000-7f359083a000 rw-p  00:00 0
7f359083a000-7f359085c000 r-xp  08:01 3817784

Re: [Rd] broken save(..., compress=xy)

2011-09-23 Thread Hervé Pagès

Hi Martin,

On 11-09-23 04:12 PM, Martin Maechler wrote:

Hervé Pagèshpa...@fhcrc.org
 on Fri, 23 Sep 2011 11:44:32 -0700 writes:


   On 11-09-23 11:02 AM, Sarah Goslee wrote:
   Hi,
 
 
   2011/9/23 Hervé Pagèshpa...@fhcrc.org:
   Hi,
 
   With current R devel and R 2.13.1:
 
   aa=1:5 save(aa, file=aa.rda, compress=xy)
   Error in identical(compress, gzip) || compress :
   invalid 'y' type in 'x || y'
 
   The options for compress are gzip bzip2 or xz (and
   not xy), at least on my linux system. Are you sure you
   want xy?

   Right, I wanted xz, sorry... Maybe error handling could
   be improved though so a typo in the input doesn't break
   the code?

well, what every  ' break the code '  means,


break here means that the if statement in charge of examining
user input doesn't execute properly for some invalid input.


you are right that a more informative error message makes sense
here (though, the code now is slightly longer).
I've committed such a change {svn rev 57057}.


Thank you!

H.



Martin

   Thanks, H.

 
   Sarah
 
   Thanks!  H.
 
   sessionInfo()
   R version 2.13.1 (2011-07-08) Platform:
   x86_64-unknown-linux-gnu (64-bit)
 
   locale: [1] LC_CTYPE=en_CA.UTF-8 LC_NUMERIC=C [3]
   LC_TIME=en_CA.UTF-8 LC_COLLATE=en_CA.UTF-8 [5]
   LC_MONETARY=C LC_MESSAGES=en_CA.UTF-8 [7]
   LC_PAPER=en_CA.UTF-8 LC_NAME=C [9] LC_ADDRESS=C
   LC_TELEPHONE=C [11] LC_MEASUREMENT=en_CA.UTF-8
   LC_IDENTIFICATION=C
 
   attached base packages: [1] stats graphics grDevices
   utils datasets methods base
 
 
   --
 








--
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpa...@fhcrc.org
Phone:  (206) 667-5791
Fax:(206) 667-1319

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