Displaying 1 result from an estimated 1 matches for "newcolnam".
Did you mean:
newcolname
2011 Aug 01
1
Inserting column in between -- "better" way?
...g 1, 2011 at 10:17 AM, Bert Gunter <bgunter at gene.com> wrote:
> Doesn't work -- you lose column names.
>
> Try this instead:
>
> yourframe[,30:51] <- cbind( newcolumn,yourframe[,30:50])
>
> Adjust column names after via:
>
> names(yourframe) [30:51] <- c(newcolname,names(yourframe[30:50])
>
> Cheers,
> Bert
>
> On Mon, Aug 1, 2011 at 10:10 AM, Sarah Goslee <sarah.goslee at gmail.com> wrote:
>> x <- cbind(x[,1:29], newcolumn, x[,30:ncol(x)])
>>
>> On Mon, Aug 1, 2011 at 12:59 PM, Bansal, Vikas <vikas.bansal at kcl....