I assume it involves:
install.package("ggplot2")
But, do I need to point to a different location inorder to get the developmental version?
Thank you again for all the feedback and insights.
> What steps do I take to install the developmental version of the
> ggplot2 package?
>
> I assume it involves:
> install.package("ggplot2")
> But, do I need to point to a different location inorder to get the
> developmental version?
You need to download the latest code from:
http://github.com/hadley/ggplot2/tree/master
If you do not have git installed you need to download the whole thing
using the download button and save that to a directory named ggplot2.
Otherwise:
git clone git://github.com/hadley/ggplot2.git
Then, from the parent of this directory, issue the command:
R CMD INSTALL ggplot2
that's on a unix kind of system. On windows I guess you can do
something with the command prompt but I am not sure how it works.
JiHO
---
http://jo.irisson.free.fr/
> I would also be interested in the steps for installing the
> developmental version on a Windows machine.
>
> Thanks a bunch for any hints or tips.
The download should not be a problem. Just go there:
http://github.com/hadley/ggplot2/tree/master
and there is a download button at the top. Then you end up with a
folder named ggplot2. This is the source of the package ggplot, so you
need to compile it. Hadley will correct me if I am wrong but I think
ggplot is written in plain R only, so you won't need anything else to
install it from source. The manual regarding installing from source on
windows is there:
http://cran.r-project.org/doc/manuals/R-admin.html#Windows-packages
It seems that 'R CMD install' is still the way to go, but for that you
must know how to use the command prompt. And, regarding that, I cannot
help you more. If many "non technical" people (no offense intended,
there is nothing wrong with not wanting to know about git or the
command prompt) are interested in getting the devel version, then
maybe having ggplot2 on r-forge would be the way to go. It would also
mean that a new release is needed but I am pretty sure Hadley has one
just around the corner.
Cheers,
JiHO
---
http://jo.irisson.free.fr/
I’m on a Linux system, and this seems to work, when but I start R and
run library(ggplot2), I get the following error message:
$ library(ggplot2)
Loading required package: proto
Loading required package: grid
Loading required package: reshape
Loading required package: plyr
Error in proto(ScaleContinuous, expr = { :
object 'ScaleContinuous' not found
Error : unable to load R code in package 'ggplot2'
Error: package/namespace load failed for 'ggplot2'
Any ideas why?
--
Karl Ove Hufthammer
This tries to load the file ‘~/documents/ggplot/ggplot/data/mpg.rda’, which naturally doesn’t exist. Easy enough to fix with a symlink, though. But ggplot2 still doesn’t seem to work properly:
$ example(qplot)
qplot$ # Use data from data.frame
qplot$ qplot(mpg, wt, data=mtcars)
Hit <Return> to see next plot:
Error in get("train_df", env = .$scales$x[[i]], inherits = TRUE)(.$scales$x[[i]], :
unused argument(s) (drop = FALSE)
--
Karl Ove Hufthammer
Note that that was with the old (non-developmental version) of ggplot2
installed. I first tried it with no version installed, but then load.r
objected. With the development version installed, I get the same error
message as before:
$ source("load.r")
Error in proto(ScaleContinuous, expr = { :
object 'ScaleContinuous' not found
Error : unable to load R code in package 'ggplot2'
Error: package/namespace load failed for 'ggplot2'
--
Karl Ove Hufthammer
Solved it. It turned out that the code depends on the various R files
being loaded in a specific order. For example, scale-.r needs to be
loaded before scale-continuous-.r, and I guess that’s the reason for the
somewhat strange name (with a trailing hyphen).
But ordering of file names are *highly* locale dependent, and for my
locale (nn_NO.UTF-8), scale-.r is *not* sorted before the other files.
Changing the locale to C, everything worked fine. But this is obviously
not an ideal solution!
--
Karl Ove Hufthammer
As I mentioned in my first post, I use Linux.
--
Karl Ove Hufthammer
Yes, this is a big pain when using proto. I should be able to solve
the problem by manually specifying a collation order in the
DESCRIPTION file (and for source.r), but then I need to make sure that
the list is kept up to date somehow. This has never been much of a
priority when it was just me interested in the development version,
but I do need to think about it more now that more people are
interested. Any suggestions would be gratefully received.
Hadley
Can you please try with the load.r that I've just uploaded? It should
automatically find the source files relative to load.r, and it
switches to my locale to make sure they get ordered in the correct
way.
Hadley
I now get this error message:
$ source("load.r")
Error in dirname(FILE) : a character vector argument expected
--
Karl Ove Hufthammer