I've downloaded the ComplexHeatmap function many of times before, but this is the first time I've seen this error message. It comes up after I try the following code, then try running the library command. R version is 4.0.0.
if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("ComplexHeatmap", force = TRUE)
install.packages('modeltools')
> library(ComplexHeatmap)
Error: package or namespace load failed for ‘ComplexHeatmap’:
.onLoad failed in loadNamespace() for 'Cairo', details:
call: inDL(x, as.logical(local), as.logical(now), ...)
error: unable to load shared object 'C:/Users/nathan.laspina/Documents/R/win-library/4.0/Cairo/libs/x64/Cairo.dll':
LoadLibrary failure: The specified procedure could not be found.
In addition: Warning message:
package ‘ComplexHeatmap’ was built under R version 4.0.3
It seems like it just got saved to the wrong place, how can I change that location?
>BiocManager::install("ComplexHeatmap", force = TRUE)
'getOption("repos")' replaces Bioconductor standard repositories, see '?repositories' for details
replacement repositories:
CRAN: https://cran.rstudio.com/
Bioconductor version 3.12 (BiocManager 1.30.18), R 4.0.0 (2020-04-24)
Installing package(s) 'ComplexHeatmap'
trying URL 'https://bioconductor.org/packages/3.12/bioc/bin/windows/contrib/4.0/ComplexHeatmap_2.6.2.zip'
Content type 'application/zip' length 3286900 bytes (3.1 MB)
downloaded 3.1 MB
package ‘ComplexHeatmap’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\...\AppData\Local\Temp\1\RtmpWwrYJX\downloaded_packages
Installation paths not writeable, unable to update packages
path: C:/Program Files/R/R-4.0.0/library
packages:
boot, class, cluster, codetools, foreign, KernSmooth, lattice, MASS, Matrix, mgcv, nlme,
nnet, rpart, spatial, survival
Old packages: 'cli', 'dbplyr', 'dplyr', 'tibble'
Update all/some/none? [a/s/n]:

Thank you. A quick question about upgrading to a newer version of R, if I may. I thought one should always stay 1 version behind because newer versions tend to have more issues with bug/crashes. Is that not true?
That's not my experience. I always upgrade to the new version of R/BioC on the day it's released, and I've never thought it was a bad idea because of bugs. And I use R all day every day, so I imagine if there were consistent problems I would have noticed them by now.
That said, there may be issues that arise where the maintainer of a package realizes there is a bug (or somebody tells them about it), and they push a fix. But for most packages the bugs are real edge cases that won't arise for most people. Something like
ComplexHeatmapgets used by thousands of people every day, and if there were a problem you know for sure people would complain and it would get fixed quickly.But anyway, IMO you should upgrade at release, every time.