Re: [R] Importing Large Dataset into Excel

From: Domenico Vistocco <vistocco_at_unicas.it>
Date: Wed, 12 Dec 2007 11:33:35 +0100

If you are using a windows system you could take a look at the xlsReadWrite packages (there are functions for reading xls files).

domenico

jim holtman wrote:
> ?count.fields
>
> count.fields will tell you how many items are in each line. As you
> said, they should all be the same, but this will confirm it.
>
> field.count <- count.fields("newborn edit.csv", sep=",")
> table(field.count) # determine count of the fields on a line
>
> On Dec 11, 2007 7:15 PM, Wayne Aldo Gavioli <wgavioli_at_fas.harvard.edu> wrote:
>
>> Hello all,
>>
>>
>> I seem to be having a problem importing a data set from Excel into R. I'm using
>> the "read.table" command to import the data with the following line of code:
>>
>>
>>> newborn<-read.table("newborn edit.csv", header=T, sep=",")
>>>
>> where "newborn edit.csv" is the name of the file. Unfortunately, I'm getting
>> back the following error message:
>>
>>
>> "Error in scan(file,, what, nmax, sep, dc, quote, skip, nlines, na.string, :
>> line 528 did not have 44 elements"
>>
>>
>> As far as I can tell, line 528 of the spreadsheet table does have the same
>> number of elements as the other rows - by chance can this error message mean
>> anything else? Also, is there an easier way to import data from R into Excel
>> using a single line of R code?
>>
>>
>> Thanks,
>>
>>
>> Wayne
>>
>> ______________________________________________
>> 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.
>>
>>
>
>
>
>



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. Received on Wed 12 Dec 2007 - 12:30:14 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 12 Dec 2007 - 13:30:18 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.