[R] Re : paste first row string onto every string in column

2009-08-12 Thread Inchallah Yarab
Try this , save your data in C:/ and write this (data <- read.csv2("c:/jill.csv", sep=",")) (C<-data[1,]) A <- numeric(4) B <- numeric(4) for (i in 1 :4){ A[i] <- paste(data[1,i],data[2,i]) B[i] <- paste(data[1,i],data[3,i]) } A B (data1 <- rbind(as.character(A),as.character(B))) (data2 <- rbi

Re: [R] Re : paste first row string onto every string in column

2009-08-12 Thread Gavin Simpson
On Wed, 2009-08-12 at 09:52 +, Inchallah Yarab wrote: > > try this , save your data in C:/ > and write this > (data <- read.csv2("c:/jill.csv", sep=",")) Why use read.csv2 yet change the separator to be the decimal point indicator in that function. You are really asking for trouble reading d

[R] Re : paste first row string onto every string in column

2009-08-12 Thread Inchallah Yarab
try this , save your data in C:/ and write this (data <- read.csv2("c:/jill.csv", sep=",")) (C<-data[1,]) A <- numeric(4) B <- numeric(4) for (i in 1 :4){ A[i] <- paste(data[1,i],data[2,i]) B[i] <- paste(data[1,i],data[3,i]) } A B (data1 <- rbind(as.character(A),as.character(B))) (data2 <- rbind