ggplot2 R CMD Problems...

86 views
Skip to first unread message

Jason Rupert

unread,
Mar 28, 2009, 12:54:39 PM3/28/09
to ggp...@googlegroups.com

Well, because I don't have access to a Windows machine to build the package, but need to run the package binary on a Windows machine I'm trying to following the instructions at the following location:
http://win-builder.r-project.org/

Below is my attempt, but R CMD build doesn't seem to be doing anything, i.e. producing a binary or thing that I would expect.

Am I missing something or is this expected?

Thanks again.


jason-ruperts-macbook-pro:hadley-ggplot2-1ec8750f0368d45144d35adf0766479f12e48525 jasonkrupert$ R CMD build --binary ggplot2
Error: cannot change to directory 'ggplot2'
jason-ruperts-macbook-pro:hadley-ggplot2-1ec8750f0368d45144d35adf0766479f12e48525 jasonkrupert$ R CMD build ggplot2
Error: cannot change to directory 'ggplot2'
jason-ruperts-macbook-pro:hadley-ggplot2-1ec8750f0368d45144d35adf0766479f12e48525 jasonkrupert$ R CMD build --binary
jason-ruperts-macbook-pro:hadley-ggplot2-1ec8750f0368d45144d35adf0766479f12e48525 jasonkrupert$ R CMD check
* checking for working pdflatex ...sh: pdflatex: command not found
NO
* checking for working latex ...sh: latex: command not found
NO
Error: no packages were specified
jason-ruperts-macbook-pro:hadley-ggplot2-1ec8750f0368d45144d35adf0766479f12e48525 jasonkrupert$


Jason Rupert

unread,
Mar 28, 2009, 5:15:34 PM3/28/09
to ggp...@googlegroups.com

Whoops. I guess I should have also pointed out that I tried the following:

jason-ruperts-macbook-pro:hadley-ggplot2-1ec8750f0368d45144d35adf0766479f12e48525 jasonkrupert$ R CMD buildjason-ruperts-macbook-pro:hadley-ggplot2-1ec8750f0368d45144d35adf0766479f12e48525 jasonkrupert$

This also did not appear to build the ggplot2 and produce a package that can be installed on Windows, as is mentioned in:
http://win-builder.r-project.org/

I guess I am overlooking a step or missing a set of instructions from someplace.

Thanks again.

P.S. Started looking at "man -k R CMD", but if there is a quicker way that has already been detailed I would greatly appreciate any guidance. Thanks again. Go World Cup Soccer!


--- On Sat, 3/28/09, Jason Rupert <jasonk...@yahoo.com> wrote:

Kasper Daniel Hansen

unread,
Mar 28, 2009, 5:31:32 PM3/28/09
to jasonk...@yahoo.com, ggp...@googlegroups.com
Don't use --binary to build the package, just do
R CMD build ggplot2
Also follow this by
R CMD check ggplot_VERSIONNUMBER.tar.gz

(note that --binary produces a *.tgz file, whereas you really want
a .tar.gz file (and I know these files are in a way the same, but .tgz
is the suffix for OS X binary files, whereas .tar.gz is for source
packages))

Also remember (this is important) to change the email address in the
Maintainer line in the ggplot2/DESCRIPTION file from Hadley's address
to your own. This email address is how winbuilder gets in touch with
you.

Kasper

Jason Rupert

unread,
Mar 28, 2009, 5:42:54 PM3/28/09
to Kasper Daniel Hansen, ggp...@googlegroups.com

Tried "R CMD build ggplot2":

jason-ruperts-macbook-pro:hadley-ggplot2-1ec8750f0368d45144d35adf0766479f12e48525 jasonkrupert$ R CMD build ggplot2Error: cannot change to directory 'ggplot2'
jason-ruperts-macbook-pro:hadley-ggplot2-1ec8750f0368d45144d35adf0766479f12e48525 jasonkrupert$

Please note that I am running "build" from within the ggplot2-version folder.

Is that the potential problem?

I guess I thought this worked like "make", but maybe not.




--- On Sat, 3/28/09, Kasper Daniel Hansen <kha...@stat.berkeley.edu> wrote:

> From: Kasper Daniel Hansen <kha...@stat.berkeley.edu>
> Subject: Re: ggplot2 R CMD Problems...
> To: jasonk...@yahoo.com
> Cc: ggp...@googlegroups.com
> Date: Saturday, March 28, 2009, 4:31 PM
> Don't use --binary to build the package, just do
> R CMD build ggplot2
> Also follow this by
> R CMD check ggplot_VERSIONNUMBER.tar.gz
>
> (note that --binary produces a *.tgz file, whereas you
> really want a .tar.gz file (and I know these files are in a
> way the same, but .tgz is the suffix for OS X binary files,
> whereas .tar.gz is for source packages))
>
> Also remember (this is important) to change the email
> address in the Maintainer line in the ggplot2/DESCRIPTION
> file from Hadley's address to your own. This email
> address is how winbuilder gets in touch with you.
>
> Kasper
>
> On Mar 28, 2009, at 14:15 , Jason Rupert wrote:
>
> >
> >
> > Whoops. I guess I should have also pointed out that I
> tried the following:
> >
> >
> jason-ruperts-macbook-pro:hadley-ggplot2-1ec8750f0368d45144d35adf0766479f12e48525
> jasonkrupert$ R CMD
> buildjason-ruperts-macbook-pro:hadley-ggplot2-1ec8750f0368d45144d35adf0766479f12e48525

Kasper Daniel Hansen

unread,
Mar 28, 2009, 6:33:35 PM3/28/09
to jasonk...@yahoo.com, ggp...@googlegroups.com
No, you need to run it in the parent directory. It is not like make,
more like zip.

Kasper
>> jason-ruperts-macbook-pro:hadley-
>> ggplot2-1ec8750f0368d45144d35adf0766479f12e48525
>> jasonkrupert$ R CMD
>> buildjason-ruperts-macbook-pro:hadley-
>> ggplot2-1ec8750f0368d45144d35adf0766479f12e48525

Jason Rupert

unread,
Mar 28, 2009, 11:44:54 PM3/28/09
to Kasper Daniel Hansen, ggp...@googlegroups.com

Oh...I think I may finally have it.

Here is the process I came up with for downloading and producing a package of the development version for ggplot2:
(1) Using your favorite method, download latest development version of ggplot2 from github. For example, navigate to
http://github.com/hadley/ggplot2/tree/master,
select download, and choose either zip or tar.gz.

(2) Once the hadley-ggplot2-xxx.zip or hadley-ggplot2-xxx.tar.gz is downloaded, uncompress, and rename the uncompressed folder to just ggplot2. For example,
.../Documents/hadley-ggplot2-c18612033a01175fe1c4396b9d51ada6131e81e8.zip
after uncompressing it becomes
.../Documents/hadley-ggplot2-c18612033a01175fe1c4396b9d51ada6131e81e8
and then renaming it becomes
.../Documents/ggplot2

(3) Now, open the terminal and navigate to the folder where the uncompressed and renamed folder is stored, i.e. step accomplished in (2).
For example,
$ pwd
.../Documents
$ ls
ggplot2
...
$ R CMD build ggplot2


(4) Once in the terminal Window, type "R CMD build ggplot2" to build the ggplot2_0.8.3.tar.gz package, which can be used on a Windows machine via install.packages("ggplot2").

The results should be similar to the following:
$ R CMD build ggplot2
* checking for file 'ggplot2/DESCRIPTION' ... OK
* preparing 'ggplot2':
* checking DESCRIPTION meta-information ... OK
* removing junk files
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* building 'ggplot2_0.8.3.tar.gz'


I haven't had a chance to test out the resulting ggplot2_0.8.3.tar.gz on a Windows machine, but should be able to very soon be able to check that out.

Thank you again for all the help getting this far. I am really looking forward to using some of the development additions Hadley has been working on.

Take care.

Kasper Daniel Hansen

unread,
Mar 29, 2009, 1:05:08 AM3/29/09
to jasonk...@yahoo.com, ggp...@googlegroups.com
Jason, you are not done yet. ggplot2_0.8.3.tar.gz is a source package,
ready for distribution. In order to use it on WIndows, you will need
to get it converted to a binary package, using winbuilder.

You need to do the following.
1) Edit the ggplot2/DESCRIPTION file in order to change the maintainer
email from Hadleys to your own.
2) Issue R CMD build and create a file ggplot2_0.8.3.tar.gz (but note
that this one has a changed email address)
3) Run
R CMD check ggplot_0.8.3.tar.gz
to make sure that 2) was succesful.
3) submit ggplot2_0.8.3.tar.gz to "winbuilder" using the instructions on
http://129.217.207.166/index.htm
(starting from bullet point 3) which will return you a file called
ggplot2_0.8.3.zip

That final file ggplot2_0.8.3.zip is ready for installation on Windows.

Kasper

Jason Rupert

unread,
Mar 29, 2009, 1:25:38 AM3/29/09
to Kasper Daniel Hansen, ggp...@googlegroups.com

Bummer...Looks like I've got more work ahead.

R CMD check ggplot_0.8.3.tar.gz
* checking for working pdflatex ...sh: pdflatex: command not found
NO
* checking for working latex ...sh: latex: command not found
NO
ggplot_0.8.3.tar.gz: No such file or directory
Error: package dir '/ggplot.Rcheck/00_pkg_src/ggplot' does not exist


Looks like the *tar.gz failed the check. Any advice on these? Are the first two warnings? Does the last error matter, and can it be easily addressed by having the ggplot package downloaded and in the same folder?

Thanks again.

Kasper Daniel Hansen

unread,
Mar 29, 2009, 1:41:11 AM3/29/09
to jasonk...@yahoo.com, ggp...@googlegroups.com
You are being told that you do not have latex installed on your
system. You can fix that by installing MacTex
http://www.tug.org/mactex/
You could perhaps forget about this step, but it is in general a good
idea to catch downstream errors.

Kasper

hadley wickham

unread,
Mar 29, 2009, 3:01:09 AM3/29/09
to jasonk...@yahoo.com, Kasper Daniel Hansen, ggp...@googlegroups.com
I wouldn't worry about that - you should just be able to source load.r
and it should load all the other files automatically (you'll need a
current version of ggplot2 installed already)

Hadley
--
http://had.co.nz/

Jason Rupert

unread,
Mar 29, 2009, 3:09:02 PM3/29/09
to Kasper Daniel Hansen, ggp...@googlegroups.com

Cool. I downloaded and installed MacTex, and then rebuilt ggplot2 and rechecked the tar.gz. The results, shown below, look promising so I uploaded the tar.gz to http://win-builder.r-project.org/upload.aspx and hope to see the zip file back sometime this afternoon. Hopefully, the zip file will install fine on the Windows machine, however, if not, as Hadley suggested, I will go the route of sourcing the load.r file on the Windows machine.

Thank you again for all your help. This has really been an eye opening experience about all the effort involved in producing the R user contributed packages and the extent of the existing R infrastructure.


$ R CMD build ggplot2
* checking for file 'ggplot2/DESCRIPTION' ... OK
* preparing 'ggplot2':
* checking DESCRIPTION meta-information ... OK
* removing junk files
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* building 'ggplot2_0.8.3.tar.gz'

$ R CMD check ggplot2_0.8.3.tar.gz

* checking for working pdflatex ... OK
* using log directory '/Users/jasonkrupert/Documents/RStuff/ggplot2buildstuff/ggplot2.Rcheck'
* using R version 2.8.0 (2008-10-20)
* using session charset: UTF-8
* checking for file 'ggplot2/DESCRIPTION' ... OK
* checking extension type ... Package
* this is package 'ggplot2' version '0.8.3'
* checking package name space information ... OK
* checking package dependencies ... ERROR
Packages required but not available:
quantreg Hmisc mapproj maps digest hexbin gpclib maptools

See the information on DESCRIPTION files in the chapter 'Creating R
packages' of the 'Writing R Extensions' manual.
Reply all
Reply to author
Forward
0 new messages