Re: [R] concatenating a string to a column

2010-11-09 Thread Santosh Srinivas
10:39 To: R-help Forum Subject: [R] concatenating a string to a column Hi All, Suppose I want to concatenate a zero to all the values to a column called period in data frame A. I want to do the following but the following command actually deletes the entire column altogether. A$period<-cat(A$per

Re: [R] concatenating a string to a column

2010-11-09 Thread Peter Langfelder
On Tue, Nov 9, 2010 at 9:09 PM, wrote: > > Hi All, > > Suppose I want to concatenate a zero to all the values to a column called > period in data frame A. I want to do the following but the following > command actually deletes the entire column altogether. > >  A$period<-cat(A$period,"0",sep="");

Re: [R] concatenating a string to a column

2010-11-09 Thread Michael Bedward
You want the paste command (cat is for printing to the console)... A$period <- paste(A$period, 0, sep="") Michael On 10 November 2010 16:09, wrote: > > Hi All, > > Suppose I want to concatenate a zero to all the values to a column called > period in data frame A. I want to do the following bu

[R] concatenating a string to a column

2010-11-09 Thread sachinthaka . abeywardana
Hi All, Suppose I want to concatenate a zero to all the values to a column called period in data frame A. I want to do the following but the following command actually deletes the entire column altogether. A$period<-cat(A$period,"0",sep=""); Any help would be appreciated. Thanks, Sachin p.s.