[R] Need Help with robustbase package: fitnorm2 and plotnorm2

M. Jankowski
2007-06-08T05:01:40Z

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,
>