[R] simulating data
Christian Schulz
ozric at web.de
Sun May 11 22:34:36 CEST 2003
..the speed penalty is not really bad, because
i need the data one time, so it can run over night!
I'm just starting experiment with loop's
and thinks that's a good exercise...
..but i need the lot of rows to test
the mysql speed penalty :-)
regards,christian
----- Original Message -----
From: "Uwe Ligges" <ligges at statistik.uni-dortmund.de>
To: "Christian Schulz" <ozric at web.de>
Cc: <r-help at stat.math.ethz.ch>
Sent: Sunday, May 11, 2003 8:02 PM
Subject: Re: [R] simulating data
> Christian Schulz wrote:
> >
> > ..for a "unit test" i need a lot of rows in my database, so i
simulate.
> >
> > My problem, using Win2k,R.1.7.0, 256RAM is that i'm getting
memory-erros go about the 1000.000 border , but
> > i need bigger test data. Ok is approriate buy more RAM, but is there a
possibilty simulate a lot of single rows, one after
> > another and between this 2 steps -> Add th row to database and delete
them for memory-recover from R ?
>
> In principle, yes. If the memory won't get too segmented it will work, I
> think.
> Simulating one row after another will certainly result in a huge speed
> penalty, but maybe one block of rows after another is the solution you
> are looking for.
>
> Uwe Ligges
>
>
> > Many thanks,Christian
> >
> > In example:
> > Nachname <- round(runif(2000000,1,1000000000))
> > Vorname <- round(runif(2000000,1,1000000000))
> > PLZ <- round(runif(2000000,10000,14000))
> > VermittlungskriteriumA <- round(runif(2000000,1,2))
> > VermittlungskriteriumB <- round(runif(200000,1,5))
> > klient0 <- cbind(Nachname,Vorname,PLZ,VermittlungskriteriumA,)
> > klient <- as.data.frame(klient0)
> > rm(klient0)
> > klient$VermittlungskriteriumA <-
as.factor(klient$VermittlungskriteriumA)
> > levels(klient$VermittlungskriteriumA) <- c("MANN","FRAU")
> > klient$VermittlungskriteriumB <-
as.factor(klient$VermittlungskriteriumB)
> > levels(klient$VermittlungskriteriumB) <-
c("<3Monate","<6Monate","<12Monate","<18Monate","=>24Monate",)
> >
> > library(RODBC)
> > channel <- odbcConnect("dsn","root","pass")
> > sqlSave(channel,klient)
> >
> > ....and more tables
> >
> > [[alternate HTML version deleted]]
> >
> > ______________________________________________
> > R-help at stat.math.ethz.ch mailing list
> > https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
More information about the R-help
mailing list