Skip to content

read.table error upon package installation (PR#8230)

2 messages · McGehee, Robert, Brian Ripley

#
Thanks for this. 

I tried switching the file extension from txt to tab, but it seems to
still split on whitespace rather than tabs.

My goal is to create a file that is both readable by R and by a
spreadsheet program, and that may contain white spaces. If tab-delimited
separation is not currently supported on load time, a CSV file would
also be a natural candidate. Unfortunately for me, it seems that R
expects the CSV file in the 'data' subdirectory to be delimited by
semi-colons rather than commas (which seems odd and might be worthy of
mention in the Writing R Extensions Manual), and the particular
spread-sheet program I use uses commas to delimit CSV files. So, then, I
think that I will be unable to use 'data' subdirectory to load this data
using data(), but any feedback on this is welcomed.

Thanks,
Robert


-----Original Message-----
From: ripley at stats.ox.ac.uk [mailto:ripley at stats.ox.ac.uk] 
Sent: Friday, October 21, 2005 1:58 AM
To: r-devel at stat.math.ethz.ch
Cc: R-bugs at biostat.ku.dk
Subject: Re: [Rd] read.table error upon package installation (PR#8230)


What is the R error here?

The default delimiter in read.table is not \t but whitespace, so the
first 
example has 2 and 3 rows (fine for header=T) and the second has 2 and 4 
rows.
On Fri, 21 Oct 2005 Robert.McGehee at geodecapital.com wrote:

            
my
Looks more like a user misunderstanding of ?data.
#
On Fri, 21 Oct 2005, McGehee, Robert wrote:

            
Using quotes, e.g. "A B C" may work?