Re: [R] Paste Funtion Help

2016-02-04 Thread Duncan Murdoch
On 04/02/2016 3:33 AM, SHIVI BHATIA wrote: HI Team, Need help with the below syntax. merge.salaries[, name:=paste("nameFirst","nameLast")]. Here merge.salaries is the data set I have merged. There are 2 columns nameFirst and nameLast I need to merge these two into one and name a

Re: [R] Paste Funtion Help

2016-02-04 Thread Bert Gunter
The problem in the original post is, as clearly stated , the ":=", which is some other language, not R. From which I infer that the OP needs to spend some additional time with an R tutorial or two to learn R. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep comin

Re: [R] Paste Funtion Help

2016-02-04 Thread Ulrik Stervbo
Hi Shivi, I usually do merge.salaries$name <- paste(merge.salaries$nameFirst, merge.salaries$nameLast) also if merge.salaries[, name:=paste("nameFirst","nameLast")] would work, you would end up with a column full of "nameFirst nameLast". Best, Ulrik On Thu, 4 Feb 2016 at 17:32 SHIVI BHATIA wr

[R] Paste Funtion Help

2016-02-04 Thread SHIVI BHATIA
HI Team, Need help with the below syntax. merge.salaries[, name:=paste("nameFirst","nameLast")]. Here merge.salaries is the data set I have merged. There are 2 columns nameFirst and nameLast I need to merge these two into one and name as name however I can getting an error: Error