Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Appending multiple large datasets
From
Sergiy Radyakin <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: Appending multiple large datasets
Date
Fri, 7 Jun 2013 15:44:19 -0400
So what exactly did not work?
Which error message are you getting?And after which line?
Insert command count after each insheet. Check how many observations
got imported.
Do not set memory in Stata 12. It can do it better then the user.
Are your CSV files really "comma separated values"? Does Excel read
them OK? Try saving from Excel and then importing XLS file into Stata
12.0.
Sergiy.
On Fri, Jun 7, 2013 at 1:57 PM, Ryan Stevens <[email protected]> wrote:
> Hi all,
>
> I'm experiencing a problem appending 2 datasets containing roughly 1
> million observations each. I'm currently running Stata 12.0. My code
> can import each dataset fine, but it always gets hung up when I try to
> append the two datasets. My code using temporary files is below and is
> very simple. I've tried creating physical .dta files and saving them
> and that did not work. I can assure you my directories work fine, so
> it's no issues with names of my files. I'm wondering if there are any
> thoughts on where this problem could lie.
>
> clear
> capture log close
> set memory 100m
> set more off
> macro drop _all
>
> *Import data
> insheet using "consump1.csv"
> tempfile master_file
> save "`master_file'"
>
> clear
> insheet using "consump2.csv"
> append using "`master_file'"
>
>
>
> Thanks for any assistance,
> Ryan
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/statalist-faq/
> * http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/