[R] import a dataset from Access database into R

jim holtman jholtman at gmail.com
Wed Dec 7 01:34:30 CET 2011


Yo need to provide a lot more information.  For example, how large is
the dataset you are trying to read (how many row/columns).  I assume
that you are running under Windows probably with a 32-bit version of
R, but who knows.  How big are the rest of the objects that you have
in your global environment? I am assuming that you have reached the
maximum memory for your 32-bit version.  You can always try running on
a 64-bit version with more memory.  Also depending on how big the
dataset is, you might read it in parts, but it is hard to say without
following the posting guidelines.

On Tue, Dec 6, 2011 at 7:17 PM, Ying Zhou <cindy_zhou_08 at hotmail.com> wrote:
>
>
>
> Hi
>
> I was trying to import a dataset from access database
> into R
>
> My code looks like below
>
>>library(RODBC)
>
>>setwd("//STATESFPSOP1/docs/CRMPO/DEPT/Retail
> PD")
>
>>channel<-odbcConnectAccess("MortgagePD.mdb")
>
>
>>Mdata<-sqlFetch(channel, "MortgagePD")
>
> But I got error messages saying
>
> Error: cannot allocate vector of
> size 27.9 Mb
>
> In addition: Warning messages:
>
> 1: In names(value) <-
> make.unique(colnames) :
>
>  Reached total allocation
> of 1535Mb: see help(memory.size)
>
> …..
>
> Then I tried to increase the memory size and import the
> data again
>
>>memory.limit(size=2000)
>
> However  I still got the same error message like
> below
>
> Error: cannot allocate vector of
> size 27.9 Mb
>
> Can someone please help me solve this problem? Thanks so
> much in advance.
>
>
> Cindy
>
>
>
>        [[alternative HTML version deleted]]
>
>
> ______________________________________________
> 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.
>



-- 
Jim Holtman
Data Munger Guru

What is the problem that you are trying to solve?
Tell me what you want to do, not how you want to do it.



More information about the R-help mailing list