no pkg on search list error after update to 0.9.2

32 views
Skip to first unread message

Pierre Roudier

unread,
Sep 9, 2012, 8:39:35 PM9/9/12
to ggplot2
Hi everyone,

I'm updating one of my packages that makes use of ggplot2 (yup, I'm a wee late),

I'm running on the following error when I try to plot stuff using my package:

> clhs::plot.cLHS_result(res)
Error in as.environment(where) :
no item called "package:ggplot2" on the search list
> traceback()
11: exists(name, "package:ggplot2")
10: find_global(scale_name, env)
9: scales_add_defaults(plot$scales, data, aesthetics, plot$plot_env)
8: get(x, envir = this, inherits = inh)(this, ...)
7: p$compute_aesthetics(d, plot)
6: f(d = data[[i]], p = layers[[i]])
5: dlapply(function(d, p) p$compute_aesthetics(d, plot))
4: ggplot_build(x)
3: print.ggplot(pl[[1]])
2: print(pl[[1]])
1: clhs::plot.cLHS_result(res)
> sessionInfo()
R version 2.15.1 (2012-06-22)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
[1] LC_CTYPE=en_NZ.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_NZ.UTF-8 LC_COLLATE=en_NZ.UTF-8
[5] LC_MONETARY=en_NZ.UTF-8 LC_MESSAGES=en_NZ.UTF-8
[7] LC_PAPER=C LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_NZ.UTF-8 LC_IDENTIFICATION=C

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

other attached packages:
[1] clhs_0.5-1

loaded via a namespace (and not attached):
[1] colorspace_1.1-1 dichromat_1.2-4 digest_0.5.2 ggplot2_0.9.2
[5] grid_2.15.1 gtable_0.1.1 labeling_0.1 lattice_0.20-10
[9] MASS_7.3-21 memoise_0.1 munsell_0.3 plyr_1.7.1
[13] proto_0.3-9.2 raster_2.0-12 RColorBrewer_1.0-5 reshape2_1.2.1
[17] scales_0.2.2 sp_0.9-99 stringr_0.6.1 tools_2.15.1

The error disappears if I type library(ggplot2) and run
clhs::plot.cLHS_result(res) again... which is weird as I'm importing
ggplot2 in the NAMESPACE:

[...]

import(utils,
ggplot2,
grid
)

importFrom(scales,
percent
)

importFrom(
plyr,
ddply,
dlply
)

importFrom(
reshape2,
melt
)

[...]

Would anybody have a hint - I guess I'm missing something here.

Cheers,

Pierre

--
Scientist
Landcare Research, New Zealand

Winston Chang

unread,
Sep 9, 2012, 8:50:42 PM9/9/12
to Pierre Roudier, ggplot2
This is a bug in 0.9.2... It happens with packages that import ggplot2
-- in which case ggplot2 is loaded but not attached. We're going to
try to get 0.9.2.1 (which fixes this bug) out quickly.

In the meantime, one workaround is to put require(ggplot2) in your
code so it gets attached. We'll try to keep the list updated on when
it goes through.

-Winston
> --
> 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

Pierre Roudier

unread,
Sep 9, 2012, 9:20:38 PM9/9/12
to Winston Chang, ggplot2
Thanks Winston,

I can confirm the fix,

Cheers,

Pierre

2012/9/10 Winston Chang <winsto...@gmail.com>:

Winston Chang

unread,
Sep 9, 2012, 11:08:33 PM9/9/12
to Pierre Roudier, ggplot2
Great, thanks for letting me know!
-Winston
Reply all
Reply to author
Forward
0 new messages