I am very sorry to bother you.
This week, I updated my R from 3.5.3 to 4.0.3, reinstalled all required R packages and reran the following R code; then got the following error: could not find function "ComBat.mc".
#' firstly Removing chip-well batch effects using ComBat from the sva package
# First we convert from beta-values to M-values
> Mvals1 <- log2(betas.rcp)-log2(1-betas.rcp)
> #' ComBat eBayes adjustment using a known variable of interest (here we use row)
> Mvals.ComBat1 <- ComBat.mc(Mvals1, batch = pData(WB.noob)$Array,nCores = detectCores()-1)
Error in ComBat.mc(Mvals1, batch = pData(WB.noob)$Array, nCores = detectCores() - :
could not find function "ComBat.mc"
I have successfully run the same R code with same data sets several times since 2017. Google searching tells me that this ComBat.mc function is from an R package "Enmix". When typing library(Enmix), no error message, so the Enmix library is installed. Can you tell me why I got this error after updating to new R version?
Thank you, Yuan Chun Ding