我在Windows 7上运行R-3.5.0和RStudio 1.1.423。我必须对这两个程序都使用公司安装程序,因此我没有下载安装程序.exe文件,而且限于安装最新的该软件的版本。
我正在尝试使用Bioconductor项目FlowCore和ggcyto软件包来绘制流式细胞仪事件。在开始时,它的效果很好,但是最近(而且我什至不知道是否更改了任何内容)都无法使用自动绘图来绘制流图。这是来自ggcyto文档的示例:
library(flowCore)
library(ggcyto)
data(GvHD)
fs <- GvHD[subset(pData(GvHD), Patient %in%5:7 & Visit %in% c(5:6))[["name"]]]
autoplot(fs, x = "SSC-H")
结果
Error in get(name, envir = asNamespace(pkg), inherits = FALSE) :
object 'ggplot.data.frame' not found
我注意到了一件奇怪的事情:我无法将stringi软件包更新到最新的(我相信是1.2.3)版本,只能更新到1.1.7。
在此线程中建议使用:R gives strange error with ggplot2 expression: object 'rversion' not found 这是一个RStudio问题。但是,当在没有RStudio的R控制台中运行相同的代码时,会出现相同的错误消息。
非常感谢您的帮助!
答案 0 :(得分:1)
我找到了问题的根源。显然我必须已经更新了我的软件包,而最新的ggplot2版本与ggcyto软件包之间的交互作用不是很好。
将ggplot2降级到2.2.1版已修复了该问题。
答案 1 :(得分:0)
我今天运行最新的R二进制文件和Rstudio版本时遇到了完全相同的问题。我最终使用了包“ flowViz”和函数:flowplot()来获得与FlowCore Vignette中使用的“ ggcyto”包的autoplot()函数基本相同的结果(只是没有装箱)。我希望这会有所帮助。
答案 2 :(得分:0)
我很高兴地报告说,在最近的R / BioC环境中,该操作不再失败:
sessionInfo()
R version 3.5.2 (2018-12-20)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)
Matrix products: default
BLAS: /n/apps/CentOS7/install/r-3.5.2/lib64/R/lib/libRblas.so
LAPACK: /n/apps/CentOS7/install/r-3.5.2/lib64/R/lib/libRlapack.so
locale:
[1] C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] ggcyto_1.10.2 flowWorkspace_3.30.2 ncdfFlow_2.28.1 BH_1.69.0-1 RcppArmadillo_0.9.400.3.0 ggplot2_3.1.1 flowCore_1.48.1 usethis_1.5.0 devtools_2.0.2
loaded via a namespace (and not attached):
[1] Rcpp_1.0.1 mvtnorm_1.0-10 lattice_0.20-38 corpcor_1.6.9 prettyunits_1.0.2 ps_1.3.0 assertthat_0.2.1 rprojroot_1.3-2 digest_0.6.18 R6_2.4.0 plyr_1.8.4 backports_1.1.4 stats4_3.5.2 pcaPP_1.9-73 pillar_1.4.0 zlibbioc_1.28.0 rlang_0.3.4 lazyeval_0.2.2 data.table_1.12.2 Rgraphviz_2.26.0 callr_3.2.0 hexbin_1.27.3 labeling_0.3 desc_1.2.0 stringr_1.4.0 munsell_0.5.0 compiler_3.5.2 pkgconfig_2.0.2 BiocGenerics_0.28.0
[30] pkgbuild_1.0.3 IDPmisc_1.1.19 tidyselect_0.2.5 gridExtra_2.3 tibble_2.1.1 matrixStats_0.54.0 XML_3.98-1.19 flowViz_1.46.1 rrcov_1.4-7 crayon_1.3.4 dplyr_0.8.1 withr_2.1.2 MASS_7.3-51.4 grid_3.5.2 gtable_0.3.0 magrittr_1.5 scales_1.0.0 graph_1.60.0 KernSmooth_2.23-15 stringi_1.4.3 cli_1.1.0 fs_1.3.1 remotes_2.0.4 testthat_2.1.1 latticeExtra_0.6-28 robustbase_0.93-5 RColorBrewer_1.1-2 tools_3.5.2 Biobase_2.42.0
[59] glue_1.3.1 DEoptimR_1.0-8 purrr_0.3.2 processx_3.3.1 pkgload_1.0.2 parallel_3.5.2 colorspace_1.4-1 cluster_2.0.9 sessioninfo_1.1.1 memoise_1.1.0