Re: [R] Remove a column of a matrix with unnamed column header

2013-11-08 Thread arun
Hi, Try:  test2 <- as.data.frame(test,stringsAsFactors=FALSE) test2[,c(2:4)] <- lapply(test2[,c(2:4)],as.numeric) A.K. On Friday, November 8, 2013 6:24 AM, Kuma Raj wrote: Beend, Thanks for that. Conversion of test to a data frame resulted in a factor. Is there a possibility to selectively con

Re: [R] Remove a column of a matrix with unnamed column header

2013-11-08 Thread Kuma Raj
Beend, Thanks for that. Conversion of test to a data frame resulted in a factor. Is there a possibility to selectively convert to numeric? I have tried this code and that has not produced the intended result. test[, c(2:4)] <- sapply(test[, c(2:4)], as.numeric) On 8 November 2013 11:31, Berend

Re: [R] Remove a column of a matrix with unnamed column header

2013-11-08 Thread Berend Hasselman
On 08-11-2013, at 10:40, Kuma Raj wrote: > I have a matrix names test which I want to convert to a data frame. When I > use a command test2<-as.data.frame(test) it is executed without a problem. > But when I want to browse the content I receive an error message "Error in > data.frame(outcome =

[R] Remove a column of a matrix with unnamed column header

2013-11-08 Thread Kuma Raj
I have a matrix names test which I want to convert to a data frame. When I use a command test2<-as.data.frame(test) it is executed without a problem. But when I want to browse the content I receive an error message "Error in data.frame(outcome = c("cardva", "respir", "cereb", "neoplasm", : dupli