Any way to preserve spaces in names when calling transform ()?

Is there a way to preserve spaces in the data.frame column names when calling transform ()? They are currently fighting:

> transform(data.frame('a b'=1, check.names=F), `c d`=`a b`)
  a.b c.d
1   1   1

      

+3


source to share


1 answer


Just submit check.names=F

to transform

:

> transform(data.frame('a b'=1, check.names=F), `c d`=`a b`,check.names=F)
  a b c d
1   1   1

      



However, I don't see this in the documentation for ?transform

!

+5


source







All Articles