When reading csv, R automatically appends the letter X to syntactically invalid column names. For instance:
> read.csv(text = "a,1,b")
[1] a X1 b
How can I add another letter inside the read.csv function when reading in a file, for example, instead of "X" add "foo" to output the output ?:
[1] a foo1 b
source
share