[R] Put square brackets as column name in a data frame

Ben Bolker bolker at ufl.edu
Fri Mar 19 20:28:04 CET 2010


Paul- <paul <at> aurynia.com> writes:

> 
> 
> names(nouvTable) = c("ID","X[m]","Y[m]","Z[m]")
> 

  Or read the table with check.names=FALSE .
  Note that this can lead to later hassles with referencing the columns;
for example you would need nouvTable$`X[m]` rather than nouvTable$X[m]



More information about the R-help mailing list