ggthemes are not working

4,058 views
Skip to first unread message

Mike Dylan

unread,
Dec 10, 2012, 11:16:21 AM12/10/12
to ggp...@googlegroups.com
I have installed ggthemes from the githup ggthemes.master.zip file on my windows xp desktop. When I installed it via the zip file, R did not give me any errors. when I try to use the ggthemes as below:
 
> qplot(carat, price, data = diamonds, colour = cut) + theme_economist() + scale_colour_economist() + ggtitle("Diamonds Are Forever")
Error: could not find function "theme_economist"
Looks like ggthemes is not really installed right. Has anyone got ggthemes working from the githup? I cannot connect to githup directly from R due to firewall issues etc. Does anybody know ggtheme is packaged up somewhere so that it could be easily installed?
 
Regards,

Mike Dylan

unread,
Dec 10, 2012, 11:59:47 AM12/10/12
to ggp...@googlegroups.com
I did this:
 
> install.packages("ggthemes-master.zip", repos = NULL, type="source")
> library(ggthemes)
Error in library(ggthemes) : there is no package called ‘ggthemes’

> require(ggthemes)
Loading required package: ggthemes
Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,  :
  there is no package called ‘ggthemes’
>
any ideas?

Shige Song

unread,
Dec 10, 2012, 11:22:11 AM12/10/12
to Mike Dylan, ggp...@googlegroups.com
I can run your example on my machine. I have some warnings saying "The following `from` values were not present in `x`: col, color, pch, cex, lty, lwd, srt, adj, bg, fg, min, max ..." but I did get the graph.

Remember to load the package "ggthemes" before you run the command though.

Shige


--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility
 
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2

Dennis Murphy

unread,
Dec 10, 2012, 3:20:30 PM12/10/12
to Shige Song, Mike Dylan, ggp...@googlegroups.com
On Mon, Dec 10, 2012 at 8:22 AM, Shige Song <shig...@gmail.com> wrote:
> I can run your example on my machine. I have some warnings saying "The
> following `from` values were not present in `x`: col, color, pch, cex, lty,
> lwd, srt, adj, bg, fg, min, max ..." but I did get the graph.

To get rid of this, the safe thing to do is to reinstall Hadley's
recently updated packages in a fresh R session. The statement is a
message, not an error, so working graphs should still render, but that
message gets annoying in a hurry. Suggestion:

(i) start a new R session with no packages other than the standard autoloads;
(ii) install.packages(c("ggplot2", "plyr", "gtable", "scales"))
(iii) try a simple plot like qplot(1:3, 1:3) - the message should now be gone.

As far as Mike's message goes, I downloaded the ggthemes package from
Github late last week and have had no problems using it. Did you read
the download directions in the README.md file? The simplest way, which
does not require compilation, is to have the latest version of
devtools installed and do

library("devtools")
install_github("ggthemes", "jrnold")

This is what worked for me. The other option is to download the tar
ball to your machine and follow the instructions in README.md; it
doesn't appear you did as instructed.

Dennis

Mike Dylan

unread,
Dec 10, 2012, 3:54:20 PM12/10/12
to ggp...@googlegroups.com
Hi Dennis:
 
I followed the directions, I can install it without errors but when I attempt to use it, I get an error:
 
here is the output:
 
> install.packages("ggthemes-master.zip", type="source", repos=NULL)

> require(ggthemes)
Loading required package: ggthemes
Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,  :
  there is no package called ‘ggthemes’

Winston Chang

unread,
Dec 10, 2012, 4:01:41 PM12/10/12
to Mike Dylan, ggplot2
On Mon, Dec 10, 2012 at 2:54 PM, Mike Dylan <seanca...@gmail.com> wrote:
Hi Dennis:
 
I followed the directions, I can install it without errors but when I attempt to use it, I get an error:
 
here is the output:
 
> install.packages("ggthemes-master.zip", type="source", repos=NULL)

> require(ggthemes)
Loading required package: ggthemes
Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,  :
  there is no package called ‘ggthemes’


Try not running install.packages -- just follow the directions that Dennis posted. 

Reply all
Reply to author
Forward
0 new messages