Hi,
On Wed, Feb 16, 2011 at 10:11 AM, mipplor <wang-paul at hotmail.com>
wrote:> Hi,
>
> I work like this:
>
>> data<?read.table('E:/my
documents/r/consumer.xls',header=TRUE)
> Warning message:
> In read.table("E:/my documents/r/consumer.xls", header = TRUE) :
> ?incomplete final line found by readTableHeader on 'E:/my
> documents/r/consumer.xls'
>
> could someone shoot the trouble for me ? thx
Le'me, just get my six shooter....
Although there is some ability to read Excel spreadsheets directly
into R, I think the easiest solution would be to first open the file
in Excel and then save it in a format more amenable to R such as .txt
or .csv. CSV files have the attractive feature that you can use
read.csv() so its even easier to read in. The R Import/Export manual
provides more details:
(1) http://cran.r-project.org/doc/manuals/R-data.html#Reading-Excel-spreadsheets
(2) Also see the documentation, which you can access at the console by typing
?read.table
Once you're done with that, I also highly recommend reading
(3) http://cran.r-project.org/doc/manuals/R-intro.html
(4) Install the "sos" package, which provides some very helpful
searching functions.
install.packages("sos")
(5) You can now use findFn() from the R console to look for packages
or functions related to Excel and it will give you a nicely formatted
table.
findFn("Excel")
(6) Once you've done the other steps, check out the R Inferno by
Patrick Burns. It is an entertaining and informative guide to help
familiarize you with using R.
http://www.burns-stat.com/pages/Tutor/R_inferno.pdf
That ought to send your trouble for a ride on the three legged horse,
Josh
>
> sorry for trouble ,im a newbie.
> --
> View this message in context:
http://r.789695.n4.nabble.com/incomplete-final-line-tp3309405p3309405.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
"If we try ridin' instead of thinkin'... Well, we'd end up
hangin' by
a rope by nightfall."
--
Joshua Wiley
Ph.D. Student, Health Psychology
University of California, Los Angeles
http://www.joshuawiley.com/