Message-ID: <F562C80A-2224-43B7-AFC8-92618A03FCEF@gmail.com>
Date: 2017-09-08T12:37:50Z
From: Peter Dalgaard
Subject: Optimize code to read text-file with digits
In-Reply-To: <B82F14D4-D41C-427C-883F-947078C53E48@gmail.com>
> On 8 Sep 2017, at 14:03 , peter dalgaard <pdalgd at gmail.com> wrote:
>
> x <- scan("~/Downloads/digits.txt")
> x <- x[-seq(1,220000,11)]
...and, come to think of it, if you really want the 1000000 random digits:
xx <- c(outer(x,10^(0:4), "%/%")) %% 10
--
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com