[R] How to import data from text file using scan() Function?

Sarah Goslee sarah.goslee at gmail.com
Thu Oct 18 17:38:48 CEST 2012


Why do you need to use scan()? read.table() would be much easier.

Sarah

On Thu, Oct 18, 2012 at 9:14 AM, killerkarthick <karthick.gdi at gmail.com> wrote:
> Hi....
>      I have one text file which containing 4 variables with 10 observations.
> I would like to import with scan() function. Please give some
> suggestion............
> Thanks...
> Mydata set is.
>
> id      name    sex     age
> 111     HELEN   f       22
> 112     DONNA   f       22
> 113     ERIC    m       21
> 114     LINDA   f       23
> 115     AXEL    m       27
> 116     Madhuri f       32
> 117     Tarun   m       39
> 118     Aashirya        f       23
> 119     Nachik  m       24
> 120     Leena   f       32
>
>

-- 
Sarah Goslee
http://www.functionaldiversity.org




More information about the R-help mailing list