Re: [R] concatenate 2 column vectors

2010-01-20 Thread teurlai magali
datatry2=transform(datatry,DIS=as.numeric(paste(datatry[,1],datatry[,2],sep=""))) It works like this !! You understood perfectly well what I needed ;-) Thanks to all that answered Magali --- En date de : Jeu 21.1.10, milton ruser a écrit : De: milton ruser Objet: Re: [R] con

Re: [R] concatenate 2 column vectors

2010-01-20 Thread David Winsemius
On Jan 20, 2010, at 11:14 PM, teurlai magali wrote: Sorry I forgot the subject in my previous post Here is an example of data : province and district code of 4 locations datatry=matrix(c(8,12,3,3,1,1,16,1),4,2) colnames(datatry)<-c("PROCODE","DISCODE") > cbind( datatry, paste(datatry[, "PR

Re: [R] concatenate 2 column vectors

2010-01-20 Thread milton ruser
Hi Magali, I confess that I still not figured out what you want, but try this: datatry2=transform(datatry,DIS=as.numeric(as.character(paste(datatry[,1],datatry[,2],sep="" bests milton On Wed, Jan 20, 2010 at 11:14 PM, teurlai magali wrote: > Sorry I forgot the subject in my previous post

Re: [R] concatenate 2 column vectors

2010-01-20 Thread teurlai magali
Sorry I forgot the subject in my previous post Here is an example of data : province and district code of 4 locations datatry=matrix(c(8,12,3,3,1,1,16,1),4,2) colnames(datatry)<-c("PROCODE","DISCODE") DISCODE is not unique for each location (there is a distrcit nb 1 in each province) I want to