[R-SIG-Mac] import data Mac OS

Thor Jensen thor.jsn at gmail.com
Mon May 2 16:22:16 CEST 2011


Hello everyone,

Thanks a ton to everyone on this thread.  Apologies for breaking
posting etiquette - this was my first post.

I got it to work using a few different suggestions, the only thing is
the my .csv file is appearing in R as separated by semicolons.  The
column headings are separated only by a period, preventing me from
manipulating the data.  For example:

> Test=read.csv(file="~/Desktop/heightweight.csv")
Message d'avis :
In read.table(file = file, header = header, sep = sep, quote = quote,  :
  readTableHeader a trouvé une ligne finale incomplète dans
'~/Desktop/heightweight.csv'
> Test
  Height.Weight
1       200;180
2       180;170
3       160;130
4       210;200
> Test$Height
[1] 200;180 180;170 160;130 210;200
Levels: 160;130 180;170 200;180 210;200
> Test$Weight
NULL
>

I have been using the above .csv file to learn the R program before
importing a much larger data set, some three thousand rows long.
Thanks again for all the inputs, and if I am using the thread
incorrectly feel free to say so.  Not intending to abuse the service.

Many thanks,

Thor

On Mon, May 2, 2011 at 3:28 PM, Thor Jensen <thor.jsn at gmail.com> wrote:
> Hello,
>
> I am unable to write a pathway to .csv files saved on my computer.  I
> can get this to work on a windows machine, but the mac returns a
> message saying the file does not exist.  Any tips on how to import
> data on mac's?  For example, the below line was unsuccesful.
> read.csv(file="Macintosh HD:Users:ThorJ:Desktop:heightweight.csv"
>
> Many thanks,
>
> Thor
>



More information about the R-SIG-Mac mailing list