search for: hringer

Displaying 2 results from an estimated 2 matches for "hringer".

Did you mean: ringer
2004 Jan 09
3
ipred and lda
Dear all, can anybody help me with the program below? The function predict.lda seems to be defined but cannot be used by errortest. The R version is 1.7.1 Thanks in advance, Stefan ---------------- library("MASS"); library("ipred"); data(iris3); tr <- sample(1:50, 25); train <- rbind(iris3[tr,,1], iris3[tr,,2], iris3[tr,,3]); test <- rbind(iris3[-tr,,1],
2004 Jul 26
3
computing sum of indicator variables
My problem is as follows: i is a list of integers of variable length. Now I want to compute a new vector/array that contains 1's at the positions indicated in i. For example: c(2, 4) -> c(0, 1, 0, 1) Using something like i = i - c(0, i[2:length(i) - 1]); sapply(i, function(x) c(rep(0, x - 1), 1))); faces me with the problem of concatenating the result, which I could somehow not find a