>
> 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")
<environment: namespace:MASS>



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

Reply via email to