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
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
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 =
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
4 matches
Mail list logo