Re: [R] How to create a correct matrix in R
Hi, Couldn't reproduce your error. It is better to dput() the example data: v <- read.table("/home/tiago/matrix.txt", header=FALSE) dput(v) v<- read.table("matrix1.txt",header=FALSE,sep="") v<-as.matrix(v) v # V1 V2 V3 V4 V5 V6 #[1,]
[R] How to create a correct matrix in R
Hello Rlisters! In my codes, I need to import a matrix: v <- read.table("/home/tiago/matrix.txt", header=FALSE) v<-as.matrix(v) v V1 V2 V3 V4 V5 V6 [1,] 1. -0.89847480 -0.73929292 -0.99055335 -0.04514469 0.04056137 [2,] -0.8984