Re: Error messages after updating to ggplot2 v 0.9.3

155 views
Skip to first unread message

Dennis Murphy

unread,
Dec 7, 2012, 2:05:47 PM12/7/12
to maga, ggp...@googlegroups.com
Hi:

Those are not error messages, but simply messages. It's possible that
some code checks in the development version were not completely
cleaned up prior to release.

Here's what I got in the Rgui console when working on a plot in
another post this morning...for one plot.

> p <- ggplot(results)
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
> p <- p + aes(x = seq(x = xmin, xmax, length.out = 100))
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
> p <- p + geom_linerange(aes(ymin = hpdLower, ymax = hpdUpper, x = patient, color = statistic), size = 1.2, width = .75, position = position_dodge(width = dodge))
The following `from` values were not present in `x`: col, pch, cex,
lty, lwd, srt, adj, bg, fg, min, max
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
> p <- p + geom_point(aes(y = mean, x = patient, color = statistic, ymax = 0), size = 2.5, position = position_dodge(width = dodge))
The following `from` values were not present in `x`: col, pch, cex,
lty, lwd, srt, adj, bg, fg, min, max
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
> p <- p + scale_x_discrete(
+ breaks = c("patient1", "patient2", "patient3", "patient5",
"patient6", "patient7", "patient8", "patient9"),
+ labels = c("patient 1", "patient 2", "patient 3", "patient
5", "patient 6", "patient 7", "patient 8", "patient 9")
+ )
> p <- p + xlab(NULL)
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
> p <- p + scale_y_continuous(expression(omega))
> p <- p + coord_flip()
> p <- p + theme_bw()
> p <- p + theme( legend.position = "top",
+ legend.justification = "center")
> # p <- p + facet_grid(. ~ analysis)
> p <- p + scale_colour_grey(
+ name = "Statistic",
+ breaks = c("omega", "omega.1", "omega.2"),
+ labels = c(expression(omega), expression(omega[1]), expression(omega[2]))
+ )
> print(p)
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
> p + theme(aspect.ratio = 0.5)
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max
The following `from` values were not present in `x`: col, color, pch,
cex, lty, lwd, srt, adj, bg, fg, min, max

The plot, however, rendered as expected. The repeated messages are an
annoyance, but they appear to be harmless.

Dennis

On Thu, Dec 6, 2012 at 11:38 PM, maga <theworld...@googlemail.com> wrote:
> after updating to version 0.9.3. I get the following error message when
> running any ggplot2 code:
>
> The following `from` values were not present in `x`: col, color, pch, cex,
> lty, lwd, srt, adj, bg, fg, min, max
>
> Here is an example (taken from the built-in ggplot help page):
>
>> df <- data.frame(gp = factor(rep(letters[1:3], each = 10)),
> + y = rnorm(30))
>> # Compute sample mean and standard deviation in each group
>> library(plyr)
>> ds <- ddply(df, .(gp), summarise, mean = mean(y), sd = sd(y))
>>
>> # Declare the data frame and common aesthetics.
>> # The summary data frame ds is used to plot
>> # larger red points in a second geom_point() layer.
>> # If the data = argument is not specified, it uses the
>> # declared data frame from ggplot(); ditto for the aesthetics.
>> ggplot(df, aes(x = gp, y = y)) +
> + geom_point() +
> + geom_point(data = ds, aes(y = mean),
> + colour = 'red', size = 3)
> The following `from` values were not present in `x`: col, color, pch, cex,
> lty, lwd, srt, adj, bg, fg, min, max
> The following `from` values were not present in `x`: col, color, pch, cex,
> lty, lwd, srt, adj, bg, fg, min, max
> The following `from` values were not present in `x`: col, color, pch, cex,
> lty, lwd, srt, adj, bg, fg, min, max
> The following `from` values were not present in `x`: col, color, pch, cex,
> lty, lwd, srt, adj, bg, fg, min, max
> The following `from` values were not present in `x`: col, color, pch, cex,
> lty, lwd, srt, adj, bg, fg, min, max
> The following `from` values were not present in `x`: col, color, pch, cex,
> lty, lwd, srt, adj, bg, fg, min, max
> The following `from` values were not present in `x`: col, color, pch, cex,
> lty, lwd, srt, adj, bg, fg, min, max
> The following `from` values were not present in `x`: col, color, pch, cex,
> lty, lwd, srt, adj, bg, fg, min, max
> The following `from` values were not present in `x`: col, color, pch, cex,
> lty, lwd, srt, adj, bg, fg, min, max
> The following `from` values were not present in `x`: col, color, pch, cex,
> lty, lwd, srt, adj, bg, fg, min, max
> The following `from` values were not present in `x`: col, color, pch, cex,
> lty, lwd, srt, adj, bg, fg, min, max
> The following `from` values were not present in `x`: col, color, pch, cex,
> lty, lwd, srt, adj, bg, fg, min, max
>
> --
> 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

Winston Chang

unread,
Dec 7, 2012, 2:14:12 PM12/7/12
to Dennis Murphy, maga, ggplot2
Those message shouldn't come up -- they only appear when plyr hasn't been properly updated.

Dennis Murphy

unread,
Dec 7, 2012, 2:19:11 PM12/7/12
to maga, ggp...@googlegroups.com
Follow-up:

After reading Winston's post in another thread, I started a new
session and reinstalled ggplot2 and plyr (along with evaluate, gtable
and scales just to be sure :). I then tried
Maga's example again:

> library(ggplot2)
> library(plyr)
> df <- data.frame(gp = factor(rep(letters[1:3], each = 10)),
+ y = rnorm(30))
> # Compute sample mean and standard deviation in each group
> library(plyr)
> ds <- ddply(df, .(gp), summarise, mean = mean(y), sd = sd(y))
>
> # Declare the data frame and common aesthetics.
> # The summary data frame ds is used to plot
> # larger red points in a second geom_point() layer.
> # If the data = argument is not specified, it uses the
> # declared data frame from ggplot(); ditto for the aesthetics.
> ggplot(df, aes(x = gp, y = y)) +
+ geom_point() +
+ geom_point(data = ds, aes(y = mean),
+ colour = 'red', size = 3)
>

The plot now renders fine and there are no messages in the console, as
the above copy/paste from the console shows. (Note the screen prompt
at the end of the snippet.) Thanks to Winston for the explanation at
the RStudio blog - I imagine it's been a hectic day or two for him
replying to all of these inquiries...

Dennis

Winston Chang

unread,
Dec 7, 2012, 2:24:11 PM12/7/12
to Dennis Murphy, maga, ggplot2
I just installed from a clean session in Windows XP, and I'm running into the problem now! But this only seems to happen on Windows.

Unfortunately, I have to run and do something else right now but I'll try to investigate later.

In the meantime, it's probably best to do install.packages(c("ggplot2", "gtable", "scales", "plyr")), and not use dep=T.

-Winston
Reply all
Reply to author
Forward
0 new messages