Re: [R] Error running lda example: Session Info

2009-11-17 Thread Greg Riddick
>
> library(MASS)
> Iris <- data.frame(rbind(iris3[,,1], iris3[,,2], iris3[,,3]),
+Sp = rep(c("s","c","v"), rep(50,3)))
> train <- sample(1:150, 75)
> table(Iris$Sp[train])

 c  s  v
22 23 30
> z <- lda(Sp ~ ., Iris, prior = c(1,1,1)/3, subset = train)
Error in if (targetlist[i] == stringname) { : argument is of length zero
>
> sessionInfo()
R version 2.10.0 (2009-10-26)
i386-apple-darwin9.8.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base

other attached packages:
[1] MASS_7.3-3


Doesn't seem to be a namespace problem:

> lda
function (x, ...)
UseMethod("lda")




-
Gregory Riddick, PhD.
CRTA Research Fellow

National Institutes of Health
National Cancer Institute, Neuro-Oncology Branch
http://home.ccr.cancer.gov/nob/

37 Convent Drive
Building 37, Room 1142
Bethesda, MD 20892-8202

Phone: 301-443-2490
Fax: 240-396-5920

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Error running lda example from Help File (MASS library )

2009-11-16 Thread Greg Riddick
The actual code for the lda example is below.  If anyone can reproduce the
error,
let me know.  Thanks.


library(MASS)

Iris <- data.frame(rbind(iris3[,,1], iris3[,,2], iris3[,,3]),
   Sp = rep(c("s","c","v"), rep(50,3)))
train <- sample(1:150, 75)
table(Iris$Sp[train])
z <- lda(Sp ~ ., Iris, prior = c(1,1,1)/3, subset = train)



>Error in if (targetlist[i] == stringname) { : argument is of length zero

System: MacOSX 10.5.8
R:  2.10.0


-- 
Gregory Riddick, PhD.
CRTA Research Fellow

National Institutes of Health
National Cancer Institute, Neuro-Oncology Branch
http://home.ccr.cancer.gov/nob/

37 Convent Drive
Building 37, Room 1142
Bethesda, MD 20892-8202

Phone: 301-443-2490
Fax: 240-396-5920

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Error running lda example from Help File (MASS library )

2009-11-14 Thread Greg Riddick
Hello all,

I'm trying to run lda() from the MASS library but the Help example generates
the
following error:


#Code from example in lda Help file



# Resulting Error

>Error in if (targetlist[i] == stringname) { : argument is of length zero


My Current R Installation:
MacOSX: 10.5.8
R: 2.10.0




-- 
Gregory Riddick, PhD.
CRTA Research Fellow

National Institutes of Health
National Cancer Institute, Neuro-Oncology Branch
http://home.ccr.cancer.gov/nob/

37 Convent Drive
Building 37, Room 1142
Bethesda, MD 20892-8202

Phone: 301-443-2490
Fax: 240-396-5920

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Problem with package SNOW on MacOS X 10.5.5

2008-12-31 Thread Greg Riddick
Hello All,

I can run the "lower level" functions OK, but many of the higher level
(eg. parSApply) functions are generating errors.

When running the example (from the snow help docs) for parApply on
MacOSX 10.5.5, I get the
following error:


cl <- makeSOCKcluster(c("localhost","localhost"))
sum(parApply(cl, matrix(1:100,10), 1, sum))

Error in do.call("fun", lapply(args, enquote)) :
  could not find function "fun"



Any ideas? Do I possibly need MPI or PVM to run the "Apply" functions?

Thanks,

-- 
Gregory Riddick, PhD.
CRTA Research Fellow

National Institutes of Health
National Cancer Institute, Neuro-Oncology Branch
9030 Old Georgetown Road
Building 37, Room 1142
Bethesda, MD 20892-8202

Phone: 301-443-2490

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.