Hi,
I just updated to R 3.4.0 on my Ubuntu Xenial box and recompiled Seurat. It was working perfectly in exactly the some environment on R 3.3.1. Now MeanVarPlot fails with the error:
Error in linbin2D(x, gpoints1, gpoints2) : object 'F_lbtwod' not found
After examining the source code and doing a bit of testing, I traced the problem to line 4547 in seurat.R, which calls the smoothScatter function from the R 'graphics' library. Running smoothScatter directly causes the same error. Looking at smoothScatter in more detail, the problematic function is KernSmooth::bkde2D, which is called by grDevices:::.smoothScatterCalcDensity inside smoothScatter. A similar bug has been reported: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=860876
The culprit in KernSmooth is the linbin2D function (line 579 https://github.com/cran/KernSmooth/blob/master/R/all.R), which contains the Fortran call:
out <- .Fortran(F_lbtwod, as.double(X), as.integer(n),
as.double(a1), as.double(a2), as.double(b1), as.double(b2),
as.integer(M1), as.integer(M2), double(M1*M2))
One work around is to set do.plot = FALSE in MeanVarPlot.
This is probably a compiler issue with the latest R on Ubuntu rather than Seurat, but thought I would post it in case anyone else gets this somewhat cryptic error.
Also, installing KernSmooth from CRAN fixes this problem without having to reinstall Seurat.
Thanks for posting this! We did notice this error on Ubuntu after upgrading to R 3.4.0 and had been recommending reverting to R 3.3.3. We'll link to this solution from the install page in case others are having similar issues.
Most helpful comment
Also, installing KernSmooth from CRAN fixes this problem without having to reinstall Seurat.