[R] import data from a csv file

Peter Ehlers ehlers at ucalgary.ca
Mon May 24 18:32:39 CEST 2010


On 2010-05-24 9:51, li li wrote:
> Hi all,
>     I have some trouble reading data from a csv file.
>     I used command "read.delim("clipboard") to read in the data.
>
>
>> aalpha.data<- read.delim("clipboard")
>> class(aalpha.data)
> [1] "data.frame"
>> dim(aalpha.data)
> [1]  8 25
>> colnames(aalpha.data)
>   [1] "X"   "V1"  "V2"  "V3"  "V4"  "V5"  "V6"  "V7"  "V8"  "V9"  "V10" "V11"
> [13] "V12" "V13" "V14" "V15" "V16" "V17" "V18" "V19" "V20" "V21" "V22" "V23"
> [25] "V24"
>> plot(aalpha.data[2:14])
>
> Somehow the plot is wrong. Can anyone give me some help? Thanks a lot!!!
>

Three questions:
1. Why not use read.csv()?
2. What does "somehow" mean to you? (Maybe you're getting a pairs plot?)
3. Have you read 'An Introduction to R', especially Chapter 12?

  -Peter Ehlers

>
>                     Hannah
>



More information about the R-help mailing list