[R] Data Analysis for Gas Prices
John
jwd at surwest.net
Sun Dec 4 09:53:58 CET 2011
On Sat, 3 Dec 2011 14:11:39 -0800 (PST)
inferno846 <robertf at uoregon.edu> wrote:
...
>
> Also, could anyone help me figure out how to import a data table to
> R? When I try to create a .txt file from a word document and read it
> in R, the format of the first column always messes up. Any/all help
> is appreciated.
>
For reading in data, avoid using Word, a program that is overkill for
almost all purposes. Either use Notepad, or grab a simple text editor
off the internet - preferably capable of block selection.
Since you do not say just how the "first column messes up," it is
rather problematic trying suggest a solution the problem. The first
line of the table and a couple data lines, the form of command you use
to read in the data and the field separator in your table are all useful
pieces of information. There are however a great many books about R out
there and nearly all of them address at least briefly how to import
data. Portland has one of the best bookstores on the planet. As a last
resort you might try the command ??read.table from the R prompt.
JD
More information about the R-help
mailing list