[R] concatenating range of columns in dataframe

Evan Cooch evan.cooch at gmail.com
Fri Mar 10 19:22:00 CET 2017



On 3/10/2017 2:23 AM, Bert Gunter wrote:
> I think you need to spend some time with an R tutorial or two,
> especially with regard to indexing.
>
> Unless I have misunderstood (apologies if I have),
>
> df$Conc <- apply(df[,-1],1,paste,collapse="")
>
> does it.
>
> -- Bert
>
>
\

Thanks -- sage advice.



More information about the R-help mailing list