Skip to content
Prev 360371 / 398503 Next

Data Frame Column Name Attribute

You could use transform() instead of [[<- to add columns to your data.frame
so the new columns get transformed they way they do when given to the
data.frame function itself.  E.g.,
'data.frame':   5 obs. of  3 variables:
 $ X   : int  1 2 3 4 5
 $ Y   : int  11 12 13 14 15
 $ NewZ: int  12 14 16 18 20
c("NewZ1","NewZ2")))))
'data.frame':   5 obs. of  4 variables:
 $ X      : int  1 2 3 4 5
 $ Y      : int  11 12 13 14 15
 $ Z.NewZ1: int  1 2 3 4 5
 $ Z.NewZ2: int  11 12 13 14 15



Bill Dunlap
TIBCO Software
wdunlap tibco.com

On Sat, Apr 23, 2016 at 8:59 AM, thomas mann <twiniverse2000 at gmail.com>
wrote: