Bookmark and Share

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: Stata vs R


From   Scott Merryman <[email protected]>
To   [email protected]
Subject   Re: st: Stata vs R
Date   Tue, 7 Jan 2014 09:50:36 -0600

I find that Stata consistently takes less than a minute (Windows,
StataMP, dual core 64bit) to load a 458mb text file:


. clear*
. set obs 1200000
obs was 0, now 1200000
. forv i = 1/40 {
  2. gen var`i' = runiform()
  3. }
.
. export delimited using "C:\Users\scott.merryman\Desktop\import
test.txt", delimiter(";") replace
(note: file C:\Users\scott.merryman\Desktop\import test.txt not found)
file C:\Users\scott.merryman\Desktop\import test.txt saved

. clear*
. tempname memhold
. tempfile results
. postfile `memhold' time using `results'
. forv i = 1/25 {
  2.         qui {
  3.         timer clear
  4.         timer on 1
  5.         import delimited "C:\Users\scott.merryman\Desktop\import
test.txt", delimiter(";") clear
  6.         timer off 1
  7.         timer list 1
  8.         post `memhold' (r(t1))
  9.         }
 10. }
.
. postclose `memhold'
. use `results', clear
. sum
    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
        time |        25    55.98164     .910623     54.781     57.826


Scott


On Tue, Jan 7, 2014 at 8:02 AM, Daniel Marcelino da
Silva,0962678,33072590,34471294, <[email protected]> wrote:
> I found the results presented in the post below quite intriguing, any
> thought?
>
> http://danielmarcelino.com/r-vs-stata-importing-and-saving-datasets/
> *
> *   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index