Skip to content
Prev 156604 / 398506 Next

Novice question about getting data into R

Ted
Thanks one and all.

Actually, I used OpenOffice's spreadsheet to creat the csv file, but I have
been using it long enough to know to specify how I wanted it, and sometimes,
when that proves annoying, I'll use Perl to finess it the way I want it.

It seems my principle error was to assume that it would ignore the character
strings within the double quotes and determine fields based on the commas. 
Silvia's remarks about empty cells and blanks in the middle of column names
were right on the mark.

Tom, I appreciate the caveats you mention.  I am aware of the complications
of i18n, but they don't affect me much as my stuff is run exclusively in
Canada (pretty much the same norms as the US).  They don't affect me (in a
sense because I have manipuated data around such issues using perl in order
to satisfy the peculiarities of the software used on one project or another
- I deal with it almost as a matter of course, as long as I already know the
peculiarities of the software I am working with), and I have plenty of
experience moving data between spreadsheets, RDBMS such as MS SQL,
PostgreSQl, MySQL, and XML files, and have had to resort to unusual
delimiters in the past because of peculiarities in the data feed.  While I
have tonnes of experience developing software (C++, Java, FORTRAN, perl) I
only started playing with R a few months ago, and this is the first I have
had to import real data into it.  While the tutorials I found were useful,
it seems there are key tidbits of information I need scattered through the
documentation and I am finding it challenging to find the peculiarities of
R.

Thanks again one and all.

Ted
Tom Backer Johnsen wrote: