Greetings:

I am trying to use your R code for R-SVM as follows. Why it dosen't print
the LOO.error and the list of features?

http://www.stanford.edu/group/wonglab/RSVMpage/R-SVM.html

My training data as follows contains 142 cases and 264 features. instead I
get en error as below "invalid 'digits' argument". Is a working example
available anywhere using R-code of R-SVM?

Thanks very much.

> source("R-SVM.R")
> data<-ReadSVMdata("train.txt")
> len<-length(data$y)
> print(data$y)
  [1] -1 -1  1 -1 -1  1  1  1 -1 -1 -1 -1 -1 -1  1  1  1 -1 -1  1 -1  1  1
1  1
 [26]  1  1  1  1 -1  1 -1  1  1 -1 -1  1 -1 -1  1 -1 -1 -1  1  1  1  1 -1
-1 -1
 [51] -1 -1 -1 -1 -1 -1  1 -1 -1 -1 -1 -1  1 -1 -1 -1 -1  1 -1 -1 -1 -1  1
-1  1
 [76] -1 -1  1 -1  1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1  1 -1 -1 -1 -1 -1 -1  1
1 -1
[101] -1  1 -1 -1 -1 -1 -1  1 -1  1  1 -1 -1 -1 -1  1  1 -1 -1  1 -1 -1 -1
-1 -1
[126]  1 -1  1 -1  1  1 -1 -1 -1  1  1  1 -1 -1 -1 -1  1
> print(dim(data$x))
[1] 142 264
> x<-data$x
> y<-data$y
> ladder<-CreatLadder(len)
> RSVMsum <- RSVM(x,y,ladder,"LOO")
> SummaryRSVM(RSVMsum)
*Error in print.default("MinCV error of", min(RSVMres$Error), "at",
MinLevel,  :
  invalid 'digits' argument
Calls: SummaryRSVM -> print -> print.default
Execution halted*

----

I only modified the ReadSVMdata function

ReadSVMdata <- function(filename)
{
    dd <- read.table( filename, header=TRUE,sep="\t")
    x <- as.matrix( dd[, 14:(ncol(dd))] )
    class <- as.numeric(dd[,2])
    class[class==2] <- -1

    y <- class
    ret <- list(x=x, y=y)
}

and un-commented this line "    print("MinCV error of", min(RSVMres$Error),
"at", MinLevel, "genes" )" in function Summary(RSVM).

	[[alternative HTML version deleted]]

