I am trying to load package "Matrix" and get this error:
Error : Function found when exporting methods from the namespace ‘Matrix’ which is not S4 generic: ‘as.vector’ In addition: Warning message: package ‘Matrix’ was built under R version 3.3.0 Error: package or namespace load failed for ‘Matrix’
I have tried restarting and installing etc.
One thing I have tried is this (R Cannot allocate memory though memory seems to be available)
wd <- getwd()
assign('.First', function(x) {
require('Matrix') #and whatever other packages you're using
file.remove(".RData") #already been loaded
rm(".Last", pos=.GlobalEnv) #otherwise won't be able to quit R without it restarting
setwd(wd)
}, pos=.GlobalEnv)
assign(".Last", function() {
system("R --no-site-file --no-init-file --quiet")
}, pos=.GlobalEnv)
save.image() #or only save the things you want to be reloaded.
q("no")
But I cant seem to get that solution working to try and see if it will load under "Vanilla" R
Edit: I was able to try and load the package under "Vanilla" R but I still get the same error