Pierre Roudier
unread,Sep 9, 2012, 8:39:35 PM9/9/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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