Hello, I create a matrix:
best <- matrix(0, ncol=2, nrow=num.selected, dimnames=list(the.best$.Name, c("Probability(%)", "Inside"))) best[,1] <- as.numeric(the.best$Total*100) best[,2] <- ifelse(the.best$Weight==0, "No", "Yes") What I want is the second column of mode numeric, but it is of mode character, despite the attempt to convert it to numeric with as.numeric(). It must have something to do with the second column of the matrix, where I write No/Yes. What should I do to have the first column of mode numeric? Also, how can I output No/Yes in the second column without citation marks around them? Thanks in advance Sergey ______________________________________________ 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.