Thank you all. I would like to say that it was my first time posting on the
r-help mailing list. I am very impressed and grateful that I got the answer
to my problem so quickly.

Back to the issue, using read.csv (instead of read.csv) and turning off the
check.names flag solved my problem.


Derek


On Sat, Sep 26, 2009 at 5:17 PM, Don MacQueen <m...@llnl.gov> wrote:

> At 1:58 AM -0400 9/26/09, Derek Foo wrote:
>
>> Hello,
>>
>> I am trying to read in a csv file with column such as
>> "\\LS01\Processor(_Total)\% Processor Time" with the command
>> read.csv("file"). However, the column name in the resulted data frame is
>> changed to "X..LS01.Processor._Total....Processor.Time".
>>
>> Strangely,
>>
>
> Not so strange. Data can be anything, but column names are names of
> variables. In R, as in most (all? many?) computer languages, variable names
> have rules they must follow. Yours don't follow R's rules.
>
> See Gabor's response to learn how to tell R to ignore the rules (in this
> particular instance). You will find, however, that later on, when you want
> to use those variables, it will be more difficult to use variables whose
> names do not follow the rules.
>
>
>   when I experimented with just reading the csv with the "head"
>> flag set to false, the text was read correctly as the same to the raw
>> file.
>> I am wondering if anyone has encountered a similar problem. If so, I would
>> really appreciate if you can share your insight.
>>
>>
>> Best Regards,
>> Derek
>>
>>        [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-help@r-project.org mailing list
>> https://*stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://
>> *www.*R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
>
> --
> --------------------------------------
> Don MacQueen
> Environmental Protection Department
> Lawrence Livermore National Laboratory
> Livermore, CA, USA
> 925-423-1062
> --------------------------------------
>

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to