This is a test version of Biostars. For the public version, visit https://www.biostars.org.
ggplot2 error message

Hello every one

I tried to load cummeRbund package, it gave me the error (Error: package ‘ggplot2’ could not be loaded). I tried to load the ggplot2, it gave the following error (Error: package or namespace load failed for ‘ggplot2’). It was working fine and properly before, now starts giving me these errors. Any tips or suggestions. I appreciate your help Shaima

> library(cummeRbund)
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: ‘BiocGenerics’

The following objects are masked from ‘package:parallel’:

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ, clusterExport, clusterMap, parApply,
    parCapply, parLapply, parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from ‘package:stats’:

    IQR, mad, xtabs

The following objects are masked from ‘package:base’:

    anyDuplicated, append, as.data.frame, as.vector, cbind, colnames, do.call, duplicated, eval, evalq,
    Filter, Find, get, grep, grepl, intersect, is.unsorted, lapply, lengths, Map, mapply, match, mget,
    order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank, rbind, Reduce, rownames, sapply,
    setdiff, sort, table, tapply, union, unique, unlist, unsplit

Loading required package: RSQLite
Loading required package: ggplot2
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
  there is no package called ‘tibble’
In addition: Warning messages:
1: package ‘cummeRbund’ was built under R version 3.2.3 
2: package ‘RSQLite’ was built under R version 3.2.5 
3: package ‘ggplot2’ was built under R version 3.2.5 
Error: package ‘ggplot2’ could not be loaded
> library(ggplot2)
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
  there is no package called ‘tibble’
In addition: Warning message:
package ‘ggplot2’ was built under R version 3.2.5 
Error: package or namespace load failed for ‘ggplot2’
>
r

I added code markup to your post for increased readability. You can do this by selecting the text and clicking the 101010 button. When you compose or edit a post that button is in your toolbar, see image below:

101010 Button

2 answers

Hello Finally I could solve the issue. I removed R and reinstall it again. I installed ggplot2, now it is working fine. I think the issue was with the new version of R software.

Thanks

Did you first install ggplot2 prior to loading it? Try

install.packages("ggplot2")
library(ggplot2)

You may also need to install the tibble package, just replace ggplot2 with tibble in the above code.

Yes, I did. I was working with it two days ago, now it is starting giving me these errors. it is already there.

Ok. Try re-installing it. Also, did you install the tibble package as well?

I did reinstalling, but it is the same issue again. When I tried to install (tible), it came with this error

install.packages("tible")
Installing package into ‘C:/Users/shaimaamore/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
Warning in install.packages :
  package ‘tible’ is not available (for R version 3.2.2)

The proper way is install.packages("tibble"), not install (tible)

Note the two b's in tibble, not one. Thanks!

Good catch :-) Important difference.

Can you show the error message you get when installing ggplot2?

Also, can you paste your sessionInfo() please.

Log in to answer this question.