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
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
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
cd /var/folders/9x/t4rzrttx23335x72l6pc7__h0000gn/T/RtmpPlqAET/
tar -czf ggplot2_0.9.0.tar.gz hadley-ggplot2-89906e6/
install_github('ggplot2', username='hadley')
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/
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.