[R] Paste Funtion Help

Duncan Murdoch murdoch.duncan at gmail.com
Thu Feb 4 18:21:26 CET 2016


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 as name however I can getting an error:
>
>   
>
> Error in `[.data.frame`(merge.salaries, , `:=`(name, paste("nameFirst",  :
>
>    could not find function ":="

It looks as though you're using syntax defined by the data.table 
package, but you don't have it attached.

Duncan Murdoch
>
>   
>
> Please advice.
>
>   
>
> Thanks, Shivi
>
> Mb: 9891002021
>
>   
>
>
>
> This e-mail is confidential. It may also be legally privileged. If you are not the addressee you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return e-mail. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. The sender does not accept liability for any errors or omissions.
>
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list