M. Jankowski
2007-Jun-08 05:01 UTC
[R] Need Help with robustbase package: fitnorm2 and plotnorm2
This is my first post requesting help to this mailing list. I am new to R. My apologies for any breach in posting etiquette. I am new to this language and just learning my way around. I am attempting to run some sample code and and am confused by the error message: Loading required package: rrcov Error in fitNorm2(fdat[, "FSC-H"], fdat[, "SSC-H"], scalefac = ScaleFactor) : Required package rrcov could not be found. In addition: Warning message: there is no package called 'rrcov' in: library(package, lib.loc lib.loc, character.only = TRUE, logical = TRUE,>that I get when I attempt to run the following sample snippet of code. The error above is taken from the code below. I am running Ubuntu Linux with all the r packages listed in the Synaptic package manager (universa). I loaded the "prada" bioconductor package as instructed in the comments and the robustbase was downloaded and installed with the command: "sudo R CMD INSTALL robustbase_0.2- 7.tar.gz", the robustbase folder is in "/usr/local/lib/R/site-library/" When I type in 'library(robustbase)' no error appears; I believe robustbase is installed correctly. The sample code was taken from FCS-prada.pdf. The sample code was written in 2005, I understand that rrcov was made part of the robustbase package sometime in the past year. This may be the cause of the problem, but, if it is, I have no idea how to fix it. Thank you in advance for helping out! Below you will find the code that generates the error and the complete output of the code. Let me know what I can do to get up and running! Matt #prada Bioconductor package #http://www.bioconductor.org/repository/devel/vignette/norm2.pdf # To install "prada" #source("http://www.bioconductor.org/biocLite.R") #biocLite("prada") library(prada) filepath <- system.file("extdata", "fas-Bcl2-plate323-04-04.A01", package = "pra da") print(filepath) sampdat <- readFCS(filepath) fdat <- exprs(sampdat) print(dim(fdat)) print(colnames(fdat)) plot(fdat[, "FSC-H"], fdat[, "SSC-H"], pch = 20, col = "#303030", xlab = "FSC", ylab = "SSC", main = "Scatter plot FSC vs SSC") #All of this goes as the help documentation suggests it should # 2. Show selections for various scale factors savepar <- par(mfrow=c(2,2)) for (Scalefactor in c(1.0, 1.5, 2.0, 2.5) ) { # The next line gives the error I've included below. nfit <- fitNorm2 (fdat[, "FSC-H"], fdat[, "SSC-H"], scalefac = ScaleFactor) plotnorm2(nfit, selection = TRUE, ellipse = TRUE, xlab="FSC-H", ylab="SSC-H", main=paste("SSC-H vs. FSC-H (ScaleFactor=",ScaleFactor,")", sep="" )) } par(savepar) Loading required package: Biobase Loading required package: tools Welcome to Bioconductor Vignettes contain introductory material. To view, type 'openVignette()' or start with 'help(Biobase)'. For details on reading vignettes, see the openVignette help page. Loading required package: RColorBrewer Loading required package: grid Loading required package: geneplotter Loading required package: annotate KernSmooth 2.22 installed Copyright M. P. Wand 1997 [1] "/usr/local/lib/R/site-library/prada/extdata/fas-Bcl2-plate323-04-04.A01" [1] 2115 8 $P1N $P2N $P3N $P4N $P5N $P6N $P7N $P8N "FSC-H" "SSC-H" "FL1-H" "FL2-H" "FL3-H" "FL2-A" "FL4-H" "Time" Loading required package: rrcov Error in fitNorm2(fdat[, "FSC-H"], fdat[, "SSC-H"], scalefac = ScaleFactor) : Required package rrcov could not be found. In addition: Warning message: there is no package called 'rrcov' in: library(package, lib.loc lib.loc, character.only = TRUE, logical = TRUE,>
Prof Brian Ripley
2007-Jun-08 06:20 UTC
[R] Need Help with robustbase package: fitnorm2 and plotnorm2
On Fri, 8 Jun 2007, M. Jankowski wrote:> This is my first post requesting help to this mailing list. I am new > to R. My apologies for any breach in posting etiquette.For future reference, telling us your version of R and exact OS would have helped here. The R posting guide suggests showing the output of sessionInfo(). Also, to help the readers, fitNorm2 (R is case-sensitive) is in 'prada', and the missing package is rrcov not robustbase.> I am new to > this language and just learning my way around. I am attempting to run > some sample code and and am confused by the error message: > Loading required package: rrcov > Error in fitNorm2(fdat[, "FSC-H"], fdat[, "SSC-H"], scalefac = ScaleFactor) : > Required package rrcov could not be found. > In addition: Warning message: > there is no package called 'rrcov' in: library(package, lib.loc > lib.loc, character.only = TRUE, logical = TRUE, > > that I get when I attempt to run the following sample snippet of code. > The error above is taken from the code below. I am running Ubuntu > Linux with all the r packages listed in the Synaptic package manager > (universa). I loaded the "prada" bioconductor package as instructed in > the comments and the robustbase was downloaded and installed with the > command: "sudo R CMD INSTALL robustbase_0.2- 7.tar.gz", the robustbase > folder is in "/usr/local/lib/R/site-library/" When I type in > 'library(robustbase)' no error appears; I believe robustbase is > installed correctly. The sample code was taken from FCS-prada.pdf. The > sample code was written in 2005, I understand that rrcov was made part > of the robustbase package sometime in the past year. This may be the > cause of the problem, but, if it is, I have no idea how to fix it.That is not the case: rrcov is a separate package, and one prada depends on. So somehow you have managed to install prada without an essential dependency 'rrcov'. That looks like a problem in the Debian/Ubuntu packaging of prada. (There is a list R-sig-debian for such issues.) Running install.packages("rrcov") inside R should fix this for you: if your R is not current (i.e. < 2.5.0) you may need to run R as root for that session. (There may be a Debian package for rrcov for your OS and R version, but without further details I cannot check.) In the current version of prada (1.12.0 for BioC-2.0 for R 2.5.0) rrcov is in Imports, so probably your version of BioC is not current either. [...] -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Apparently Analagous Threads
- strange behaviour of importFrom directive in name space
- strange behaviour of importFrom directive in name space
- Results of MCD estimators in MASS and rrcov
- Package rrcov, functions PcaCov, PcaHubert, PcaGrid
- Why is my R package still compiling with the O2 flag?