Re: [Rd] Build from Source fails on Loading required package Matrix

2012-08-16 Thread Dan Murphy
Uwe:

Thanks to your gentle nudge I reread the manual and learned that your
preferred version of tar is installed by Rtools. After a little glitch
and a July 2 R-help post about a missing file in the tarball, I was
able to build the patched version of 2.15.1. The work y'all do is
beyond words. In case anyone is interested in the steps I took, here
they are:

Building R-2.15.1 64-bit from Source on Windows

“R_Admin” will refer to the R Installation and Administration manual.

Getting the Tools
Per Appendix D of R_Admin I downloaded and installed Rtools215.exe
from the link at the beginning of that appendix, MiKTeX, and Inno. The
installation of RTools automatically set the system version of the
PATH variable so that the necessary folders for building R are given
in the preferred order. On my machine the RTools were placed in the
C:\RTools folder. Per section 3.1.1 of R_Admin, RTools also installed
“extra files” in C:\R and C:\R64 –- more below.

Getting the Source
The 2.15.1 tarball on CRAN’s home has an issue with a missing file
(per R-help post on 2012-07-02) so I got the most recent patched
version per the instructions of section 1.2 of R_Admin by clicking on
last night’s “R-patched…” link at the indicated ftp site. I made a
directory in C:\Program Files called R-2.15.1 –- my Windows id has
Administrator privileges –- and placed the tarball into that folder.

Unpacking
I used Rtools' tar to unpack the tarball by opening a command window
with Administrator privileges (right click, Run as Administrator),
navigating to C:\Program Files\R-2.15.1, and then running tar on the
tarball with the “--no-same-owner” option per section 3.1.2 of
R_Admin. tar automatically created an R-patched subdirectory within
C:\Program Files\R-2.15.1 and placed all the files there. Thus, R_HOME
in R_Admin was equivalent to C:\Program Files\R 2.15.1\R patched for
this build.

Getting the Tools (continued): “the extra files”
Per the last two bullets of R_Admin section 3.1.2, I copied the \Tcl
subdirectory from C:\R64 (because I’m building the 64-bit version) to
C:\Program Files\R-2.15.1\R-patched and copied the three folders in
C:\R64\src\gnuwin32\bitmap to the directory C:\Program
Files\R-2.15.1\R-patched\src\gnuwin32\bitmap.

MkRules.local
Per R_Admin 3.1.3, I made a copy of MkRules.dist and made the following changes
MkRules.dist  MkRules.local
MULTI =   MULTI = 64
# JPEGDIR JPEGDIR
# PNGDIR  PNGDIR
# TIFFDIR TIFFDIR

Building the core files
My C:\Temp directory can be written to by almost everyone, so, per
section 3.1.3, in the still open command window I set the TMPDIR
variable to that folder by SET TMPDIR=C:\Temp. Then “make all
recommended” ran without error. C:\Program
Files\R-2.15.1\R-patched\bin\x64\Rgui.exe worked.

Thanks again!
Dan

On Wed, Aug 15, 2012 at 9:06 AM, Uwe Ligges
 wrote:
>
>
> On 15.08.2012 17:53, Dan Murphy wrote:
>>
>> On Wed, Aug 15, 2012 at 8:04 AM, Simon Urbanek
>>  wrote:
>>>
>>>
>>> Dan,
>>>
>>> On Aug 15, 2012, at 10:54 AM, Dan Murphy  wrote:
>>>
 Hello:

 I am building R 2.15.1 from source on a Windows 7 machine with the x64
 toolset, MixTeX, and InnoSetup per
 http://cran.r-project.org/bin/windows/Rtools/. I obtained the source for
 2.15.1 via svn from https://svn.r-project.org/R/branches/R-2-15-branch/.
>>>
>>>
>>> Did you also rsync the recommended packages? They are not in the SVN. If
>>> in doubt, use released source tar balls.
>>>
>>> Cheers,
>>> Simon
>>>
>> Thanks, Simon. I should have mentioned that as well. Yes, I did "make
>> rsync-recommended" per Chapter 3 of the manual and that worked without
>> error.
>>
>> I first inadvertently had tried to build the 2.16 version in /trunk
>> and got that "undefined exports" error, then switched to the
>> /R-2-15-branch when I realized /trunk held the development version.
>>
>> In between the two svn checkouts, I had tried the source tar ball at
>> the link  R-2.15.1.tar.gz. That terminated much sooner in the build,
>> which I thought could have resulted from me using 7-Zip on the tar
>> ball (lacking a windows version of your tar), so I went back to the
>> subversion checkout method.
>
>
> Please read the R Installation and Administration manual that explains how
> to set up your environment under Windows to build R yourself and what tools
> are needed. Note that a binary is available from CRAN.
>
> Uwe Ligges
>
>
>
>>
>>>
>>>
 This is my first try building R from source. The build seems to go far,
 then terminates with "undefined exports: .M.classEnv" from the Matrix
 package, I believe. Here are the last few lines of the build session

 Creating a generic function for 'qr.resid' from package 'base' in
 package
 'Matrix'
 Creating a generic function for 'qr.fitted' from package 'base' in
 package
 'Matrix'
 ** help
 *** installing help indices
 ** building package indices
 Loading required package: Matrix
 Error in namespaceExpo

Re: [Rd] chown, chgrp?

2012-08-16 Thread Prof Brian Ripley

On 15/08/2012 18:38, peter dalgaard wrote:


On Aug 15, 2012, at 17:56 , Barry Rowlingson wrote:


On Wed, Aug 15, 2012 at 2:47 PM, Simon Urbanek
 wrote:



... and moreover with the increasing adoption of ACL on unix and non-existence 
of uid/gid on Windows this is more an archaic curiosity so I don't think it 
makes sense to add it at this point.



It does however raise the question, "What is Hadley up to now?" :)


Aiming for the fortune file again, Barry?

Anyways, since it is not portable anyway, what was ever wrong with

system(sprintf("chown %s %s", foo, bar)

?


Yes, that is the point. I added Sys.chmod because R's own scripts needed 
something portable (both to Windows, and later in the handling of umask 
where POSIX allows some wiggle room).  We've never needed chown/chgrp.



--
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] Compressing data for package builds

2012-08-16 Thread steven mosher
Hi,

 I have two  .rda files that I need to include in a package.  I've placed
them both in a data directory
 after  save()  the are around  150Kb  each.

When I try to check the package I get the following warning

Warning: large data file(s) saved inefficiently:
size ASCII compress
  zagoskin.rda 137Kb FALSE none

  Note: significantly better compression could be obtained
by using R CMD build --resave-data
   old_size new_size compress
  modpoll.rda 124Kb 78Kb   xz
  zagoskin.rda137Kb  6Kbbzip2

Both of these files modpoll.rda and zagoskin.rda  have already been
compressed from megabytes down to Kb.

Also,, the  instructions"R CMD build --resave-data"  doesnt do anything
that I can see so I must be using it wrong.
Is there a piece of the puzzle I am missing or instructions better than
these: I tried  LazyDataCompression and my
data.rdb is 90Kb.

"Package *tools* has a couple of functions to help with data images:
checkRdaFiles reports on the way the image was saved, and resaveRdaFiles will
re-save with a different type of compression, including choosing the best
type for that particular image.

Some packages using ‘LazyData’ will benefit from using a form of
compression other than gzip in the installed lazy-loading database. This
can be selected by the --data-compress option to R CMD INSTALL or by using
the ‘LazyDataCompression’ field in the DESCRIPTION file. Useful values are
bzip2, xz and the default, gzip. The only way to discover which is best is
to try them all and look at the size of the pkgname/data/Rdata.rdb file."

[[alternative HTML version deleted]]

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


Re: [Rd] Compressing data for package builds

2012-08-16 Thread Simon Urbanek

On Aug 16, 2012, at 5:08 PM, steven mosher wrote:

> Hi,
> 
> I have two  .rda files that I need to include in a package.  I've placed
> them both in a data directory
> after  save()  the are around  150Kb  each.
> 
> When I try to check the package I get the following warning
> 
> Warning: large data file(s) saved inefficiently:
>size ASCII compress
>  zagoskin.rda 137Kb FALSE none
> 
>  Note: significantly better compression could be obtained
>by using R CMD build --resave-data
>   old_size new_size compress
>  modpoll.rda 124Kb 78Kb   xz
>  zagoskin.rda137Kb  6Kbbzip2
> 
> Both of these files modpoll.rda and zagoskin.rda  have already been
> compressed from megabytes down to Kb.
> 
> Also,, the  instructions"R CMD build --resave-data"  doesnt do anything
> that I can see so I must be using it wrong.

R CMD build is how you preferably should be creating your package tar ball, so 
you simply add the --resave-data argument to your already existing R CMD build 
call which creates the tar ball from your source directory. So can you 
elaborate on "doesn't do anything I can see"? In what sense? No output? No 
compression?

Cheers,
Simon


> Is there a piece of the puzzle I am missing or instructions better than
> these: I tried  LazyDataCompression and my
> data.rdb is 90Kb.
> 
> "Package *tools* has a couple of functions to help with data images:
> checkRdaFiles reports on the way the image was saved, and resaveRdaFiles will
> re-save with a different type of compression, including choosing the best
> type for that particular image.
> 
> Some packages using ŒLazyData‚ will benefit from using a form of
> compression other than gzip in the installed lazy-loading database. This
> can be selected by the --data-compress option to R CMD INSTALL or by using
> the ŒLazyDataCompression‚ field in the DESCRIPTION file. Useful values are
> bzip2, xz and the default, gzip. The only way to discover which is best is
> to try them all and look at the size of the pkgname/data/Rdata.rdb file."
> 
>   [[alternative HTML version deleted]]
> 
> __
> 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] Compressing data for package builds

2012-08-16 Thread steven mosher
" R CMD build is how you preferably should be creating your package tar
ball, so you simply add the --resave-data argument to your already existing
R CMD build call which creates the tar ball from your source directory. So
can you elaborate on "doesn't do anything I can see"? In what sense? No
output? No compression? "

my tarball builds with   > R CDM build mattools

where mattools is the name of the package. and I get a warning on R CMD
check.

Things I tried

R CMD build --resave-data
R CMD build mattools --resave-data
R CMD build --resave-data mattools

The first does nothing, the second fails on unknown options and the third
fails on unknown options. So I  found the help for R CMD

Now that I figured out how to display help for  R CMD build  I see that

--resave-data   must include a specification of the type of compression

--resave-data="best"   for example

I ran that.  and got the same error indicating that the   rda file had not
been compressed.

 checking data for non-ASCII characters ... OK
* checking data for ASCII and uncompressed saves ... WARNING
  Warning: large data file(s) saved inefficiently:
size ASCII compress
  zagoskin.rda 137Kb FALSE none

  Note: significantly better compression could be obtained
by using R CMD build --resave-data
   old_size new_size compress
  modpoll.rda 124Kb 78Kb   xz
  zagoskin.rda137Kb  6Kbbzip2

Building under windows so I wonder if I am missing a system file required
to do the compression.

On Thu, Aug 16, 2012 at 5:48 PM, Simon Urbanek
wrote:

>
> On Aug 16, 2012, at 5:08 PM, steven mosher wrote:
>
> > Hi,
> >
> > I have two  .rda files that I need to include in a package.  I've placed
> > them both in a data directory
> > after  save()  the are around  150Kb  each.
> >
> > When I try to check the package I get the following warning
> >
> > Warning: large data file(s) saved inefficiently:
> >size ASCII compress
> >  zagoskin.rda 137Kb FALSE none
> >
> >  Note: significantly better compression could be obtained
> >by using R CMD build --resave-data
> >   old_size new_size compress
> >  modpoll.rda 124Kb 78Kb   xz
> >  zagoskin.rda137Kb  6Kbbzip2
> >
> > Both of these files modpoll.rda and zagoskin.rda  have already been
> > compressed from megabytes down to Kb.
> >
> > Also,, the  instructions"R CMD build --resave-data"  doesnt do
> anything
> > that I can see so I must be using it wrong.
>
> R CMD build is how you preferably should be creating your package tar
> ball, so you simply add the --resave-data argument to your already existing
> R CMD build call which creates the tar ball from your source directory. So
> can you elaborate on "doesn't do anything I can see"? In what sense? No
> output? No compression?
>
> Cheers,
> Simon
>
>
> > Is there a piece of the puzzle I am missing or instructions better than
> > these: I tried  LazyDataCompression and my
> > data.rdb is 90Kb.
> >
> > "Package *tools* has a couple of functions to help with data images:
> > checkRdaFiles reports on the way the image was saved, and resaveRdaFiles
> will
> > re-save with a different type of compression, including choosing the best
> > type for that particular image.
> >
> > Some packages using ŒLazyData‚ will benefit from using a form of
> > compression other than gzip in the installed lazy-loading database. This
> > can be selected by the --data-compress option to R CMD INSTALL or by
> using
> > the ŒLazyDataCompression‚ field in the DESCRIPTION file. Useful values
> are
> > bzip2, xz and the default, gzip. The only way to discover which is best
> is
> > to try them all and look at the size of the pkgname/data/Rdata.rdb file."
> >
> >   [[alternative HTML version deleted]]
> >
> > __
> > R-devel@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel
>
>

[[alternative HTML version deleted]]

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