On May 26, 2011, at 5:15 PM, Struckmeier, Nathanael wrote:
> Hello,
>
> I've been banging my head against my monitor for some time now
> trying to
> import data into R. The problem is either in my use of syntax, my data
> format, or my memory. I have described what I have tried below. Please
> help.
>
> =========My GOAL=============================>
>> import a 4 column, 8,000 row table into R including headers.
>
> =========WHAT I'VE ATTEMPTED=================>
> Original data was in Excel format.
>
> Converted data to both a .txt and .csv (to see which worked better)
>
> Imported data into R via commands as object "demand" (see below)
>
> Please excuse the long file path.
>
> demand=read.delim("C:\\Documents and Settings\\E066582\\My
> Documents\\R\\R-2.13.0\\bin\\demand.txt", header=T)
>
>
>
> demand=read.csv(("C:\\Documents and Settings\\E066582\\My
> Documents\\R\\R-2.13.0\\bin\\demand.csv")
>
> ==========PROBLEMS=============================>
> In both cases, about half to three fourths of my data shows up as
>
> object "demand" with about 4000 lines. My headers also fail to
appear.
> When my data is imported into R and I type the object name to bring it
> up I receive a memory usage error.
>
> ==========SOLUTIONS===========================>
> I've gone in and cleaned up my data, making sure there are no (')
or
> (#)
> but it could still a formatting issue
>
> My computer has 1.9GB RAM. I have looked but I can't figure out how
> to
> increase R memory usage.
>
> Any ideas would be appreciated. If someone needs more information to
> help me I'll supply it.
The "information" needed to address this is a public path to a place
where one of those files resides.
The problem is almost certainly not related to memory size. That is a
tiny file. You could also cut and paste the first 20 lines into a
message. Maybe there is something in the contents of the header that
is the problem.
--
David Winsemius, MD
West Hartford, CT