Error installing ggplot2 0.9.0

439 views
Skip to first unread message

Prabhas P

unread,
Feb 13, 2012, 3:11:38 PM2/13/12
to ggplo...@googlegroups.com
Hi all,
I'm trying to check out some of the exciting new stuff in ggplot 0.9.0. I followed instructions in https://groups.google.com/d/topic/ggplot2/8c-ofEvAyN4/discussion and am getting the following error:

R> dev_mode()
Dev mode: OFF
R> install_github('ggplot2')
Installing ggplot2 from hadley
Installing ggplot2
* checking for file '/private/var/folders/9x/t4rzrttx23335x72l6pc7__h0000gn/T/RtmpZM59UR/hadley-ggplot2-89906e6/DESCRIPTION' ... OK
* preparing 'ggplot2':
* checking DESCRIPTION meta-information ... OK
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* looking to see if a 'data/datalist' file should be added
* building 'ggplot2_0.9.0.tar.gz'
Warning: invalid package ‘/var/folders/9x/t4rzrttx23335x72l6pc7__h0000gn/T//RtmpZM59UR/ggplot2_0.9.0.tar.gz’
Error: ERROR: no packages specified
Reloading installed ggplot2
Warning message:
In install.packages(built_path, repos = NULL, type = "source") :
  installation of package ‘/var/folders/9x/t4rzrttx23335x72l6pc7__h0000gn/T//RtmpZM59UR/ggplot2_0.9.0.tar.gz’ had non-zero exit status
R> library(ggplot2)
R> sessionInfo()
R version 2.14.0 (2011-10-31)
Platform: i386-apple-darwin9.8.0/i386 (32-bit)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] grid      graphics  grDevices utils     datasets  methods   base     
other attached packages:
[1] ggplot2_0.8.9  proto_0.3-9.2  reshape_0.8.4  plyr_1.6       devtools_0.5.1
loaded via a namespace (and not attached):
[1] RCurl_1.9-5  stats_2.14.0 tools_2.14.0

Funnily, traceback gives me nothing
R> traceback()
No traceback available 

Any ideas how to go further? I've done a bit of work in ggplot2 and R so far, but only for a few months, and can't debug this message further.

thanks in advance,
--p

Prabhas P

unread,
Feb 13, 2012, 3:18:45 PM2/13/12
to ggplo...@googlegroups.com
Installing scales also shows an error. I don't understand how, but I can load scales, and it loads scales_0.1.0.
When I try to load ggplot2, it shows 0.8.9 still though.
 
R> install_github('scales')
Installing scales from hadley
Installing scales
* checking for file '/private/var/folders/9x/t4rzrttx23335x72l6pc7__h0000gn/T/RtmpWicaFG/hadley-scales-79603ba/DESCRIPTION' ... OK
* preparing 'scales':

* checking DESCRIPTION meta-information ... OK
* installing the package to process help pages
Loading required package: scales
* saving partial Rd database

* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* building 'scales_0.1.0.tar.gz'
Installing package(s) into ‘/Users/myusername/R-dev’
(as ‘lib’ is unspecified)
Warning: invalid package ‘/var/folders/9x/t4rzrttx23335x72l6pc7__h0000gn/T//RtmpWicaFG/scales_0.1.0.tar.gz’

Error: ERROR: no packages specified
Warning message:
In install.packages(built_path, repos = NULL, type = "source") :
  installation of package ‘/var/folders/9x/t4rzrttx23335x72l6pc7__h0000gn/T//RtmpWicaFG/scales_0.1.0.tar.gz’ had non-zero exit status
R> install_github('ggplot2')
Installing ggplot2 from hadley
Installing ggplot2
* checking for file '/private/var/folders/9x/t4rzrttx23335x72l6pc7__h0000gn/T/RtmpWicaFG/hadley-ggplot2-89906e6/DESCRIPTION' ... OK
* preparing 'ggplot2':
* checking DESCRIPTION meta-information ... OK
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* looking to see if a 'data/datalist' file should be added
* building 'ggplot2_0.9.0.tar.gz'
Installing package(s) into ‘/Users/myusername/R-dev’
(as ‘lib’ is unspecified)
Warning: invalid package ‘/var/folders/9x/t4rzrttx23335x72l6pc7__h0000gn/T//RtmpWicaFG/ggplot2_0.9.0.tar.gz’
Error: ERROR: no packages specified
Warning message:
In install.packages(built_path, repos = NULL, type = "source") :
  installation of package ‘/var/folders/9x/t4rzrttx23335x72l6pc7__h0000gn/T//RtmpWicaFG/ggplot2_0.9.0.tar.gz’ had non-zero exit status
R> library(scales)
R> library(ggplot2)
Loading required package: reshape
Loading required package: plyr
Attaching package: ‘reshape’
The following object(s) are masked from ‘package:plyr’:
    rename, round_any
Loading required package: grid
Loading required package: proto
Attaching package: ‘ggplot2’
The following object(s) are masked from ‘package:scales’:
    alpha, col2hcl, comma, date_breaks, dollar, expand_range, fullseq, muted, percent,
    rescale, scientific

R> sessionInfo()
R version 2.14.0 (2011-10-31)
Platform: i386-apple-darwin9.8.0/i386 (32-bit)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] grid      stats     graphics  grDevices utils     datasets  methods   base     
other attached packages:
[1] ggplot2_0.8.9  proto_0.3-9.2  reshape_0.8.4  plyr_1.6       scales_0.1.0   devtools_0.5.1

loaded via a namespace (and not attached):
[1] colorspace_1.1-0   dichromat_1.2-4    munsell_0.3        RColorBrewer_1.0-5 RCurl_1.9-5       
[6] stringr_0.5        tools_2.14.0 

Dennis Murphy

unread,
Feb 13, 2012, 3:43:50 PM2/13/12
to Prabhas P, ggplo...@googlegroups.com
Hi:

You need dev_mode() to be ON in order to install development versions
of R packages. You should also have Rtools installed, although I don't
think it's strictly necessary for compiling ggplot2 since it is pure
R. You should do this:

library('devtools')
dev_mode() # should reply dev mode: ON
install_github('ggplot2')

You don't get a traceback because the R function returned no error; it
was the compilation that failed.

When I load up devtools, I get the message
"Rtools not in path, adding automatically."
I don't know if this is platform specific or not because I've only
done it in Windows 7. At the very least, the message tells you that
Rtools is installed on your system.

However, you *do* need to have dev_mode ON before installing ggplot2
or any other package from GitHub.

Here's an example from loading the development version of the ggmap
package this morning:

> library('devtools')
Rtools not in path, adding automatically.
> dev_mode()
Dev mode: ON
> install_github('ggmap', username = 'dkahle')
Installing ggmap from dkahle
Installing ggmap
* checking for file
'C:\Users\Dennis\AppData\Local\Temp\RtmpSkqlcC\dkahle-ggmap-3ec047d/DESCRIPTION'
... OK
* preparing 'ggmap':


* checking DESCRIPTION meta-information ... OK
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* looking to see if a 'data/datalist' file should be added

* building 'ggmap_1.0.tar.gz'
<some warning messages snipped>
Installing package(s) into ‘C:/Users/Dennis/R-dev’
(as ‘lib’ is unspecified)
* installing *source* package 'ggmap' ...
** R
** data
** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices ...
** testing if installed package can be loaded

* DONE (ggmap)
Reloading installed ggmap


HTH,
Dennis

Prabhas Pokharel

unread,
Feb 13, 2012, 3:57:43 PM2/13/12
to Dennis Murphy, ggplo...@googlegroups.com
Unfortunately, this doesn't help (I'd tried both ways earlier, ended up copy-pasting the wrong version). Re-ran, in a new R session... I removed ggplot2 namespace for extra carefulness...I've tried this both ways.

R> library('devtools')
R> dev_mode()
Dev mode: ON
R> sessionInfo()
R version 2.14.0 (2011-10-31)
Platform: i386-apple-darwin9.8.0/i386 (32-bit)

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

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

other attached packages:
[1] devtools_0.5.1

loaded via a namespace (and not attached):
[1] ggplot2_0.8.9 plyr_1.6      RCurl_1.9-5   tools_2.14.0 
R> unloadNamespace('ggplot2')
R> sessionInfo()
R version 2.14.0 (2011-10-31)
Platform: i386-apple-darwin9.8.0/i386 (32-bit)

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

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

other attached packages:
[1] devtools_0.5.1

loaded via a namespace (and not attached):
[1] plyr_1.6     RCurl_1.9-5  tools_2.14.0
R> install_github('ggplot2')
Installing ggplot2 from hadley
Installing ggplot2
* checking for file '/private/var/folders/9x/t4rzrttx23335x72l6pc7__h0000gn/T/RtmpPlqAET/hadley-ggplot2-89906e6/DESCRIPTION' ... OK
* preparing 'ggplot2':
* checking DESCRIPTION meta-information ... OK
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* looking to see if a 'data/datalist' file should be added
* building 'ggplot2_0.9.0.tar.gz'

Installing package(s) into ‘/Users/prabhaspokharel/R-dev’
(as ‘lib’ is unspecified)
Warning: invalid package ‘/var/folders/9x/t4rzrttx23335x72l6pc7__h0000gn/T//RtmpPlqAET/ggplot2_0.9.0.tar.gz’
Error: ERROR: no packages specified
Warning message:
In install.packages(built_path, repos = NULL, type = "source") :
  installation of package ‘/var/folders/9x/t4rzrttx23335x72l6pc7__h0000gn/T//RtmpPlqAET/ggplot2_0.9.0.tar.gz’ had non-zero exit status
R> library(ggplot2)
Loading required package: reshape
Loading required package: plyr

Attaching package: ‘reshape’

The following object(s) are masked from ‘package:plyr’:

    rename, round_any

Loading required package: grid
Loading required package: proto
R> sessionInfo()
R version 2.14.0 (2011-10-31)
Platform: i386-apple-darwin9.8.0/i386 (32-bit)

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

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

other attached packages:
[1] ggplot2_0.8.9  proto_0.3-9.2  reshape_0.8.4  plyr_1.6       devtools_0.5.1

loaded via a namespace (and not attached):
[1] RCurl_1.9-5  tools_2.14.0


I got no message about Rtools either. When I try to install, I get nothing:

install.packages('Rtools')
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
  package ‘Rtools’ is not available (for R version 2.14.0)

--
Prabhas Pokharel
http://twitter.com/prabhasp
Nepal mobile: +977 98137 91044
US mobile: +1 347 948 7654
skype/facebook/whatever: prabhasp

Johannes Radinger

unread,
Feb 13, 2012, 4:05:30 PM2/13/12
to Prabhas Pokharel, Dennis Murphy, ggplo...@googlegroups.com
Hi,

as Dennis said, you need to have dev mode ON before you even  install ggplot dev-version.
Have you also tried to (re)install ggplot dev-version with dev mode ON?

# like:
library('devtools')
dev_mode()
Dev mode: ON
install_github('ggplot2')
library(ggplot2)

/johannes

Prabhas Pokharel

unread,
Feb 13, 2012, 4:14:51 PM2/13/12
to Johannes Radinger, Dennis Murphy, ggplo...@googlegroups.com
Actually, I ended up solving this problem by doing the following:

cd /var/folders/9x/t4rzrttx23335x72l6pc7__h0000gn/T/RtmpPlqAET/
tar -czf ggplot2_0.9.0.tar.gz hadley-ggplot2-89906e6/ 

after that, in R,
install_github('ggplot2', username='hadley')
succeeded.

The obscure directory I got directly from the error message.
I guess however it (install_github?) was unzipping the downloaded package, the package is getting deleted on my system, but not on others who haven't been having issues. If anyone else is having the same issue on Mac OS X Lion, I guess this might be worth a try.

Thanks all!

Hadley Wickham

unread,
Feb 13, 2012, 4:35:05 PM2/13/12
to Prabhas Pokharel, Johannes Radinger, Dennis Murphy, ggplo...@googlegroups.com
> The obscure directory I got directly from the error message.
> I guess however it (install_github?) was unzipping the downloaded package,
> the package is getting deleted on my system, but not on others who haven't
> been having issues. If anyone else is having the same issue on Mac OS X
> Lion, I guess this might be worth a try.

You might also try:

install_github("devtools")

to get the latest version of devtools, because I think this is a bug
that's been fixed in the development version of devtools.

Hadley


--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/

Hadley Wickham

unread,
Feb 13, 2012, 4:35:39 PM2/13/12
to Dennis Murphy, Prabhas P, ggplo...@googlegroups.com
> You need dev_mode() to be ON in order to install development versions
> of R packages. You should also have Rtools installed, although I don't
> think it's strictly necessary for compiling ggplot2 since it is pure
> R. You should do this:

You don't _need_ it to be on - you want it to be on so that it doesn't
override your existing ggplot2 install. Everything should work
regardless of the dev_mode() status.

Reply all
Reply to author
Forward
0 new messages