2011/8/19 Krystian Radlak
> I have very long vector stored in ff object and I want to chse elements
> from
> this vector which fulfil logical expresion (for example a>1)
>
?ffvecapply
k<-ffvecapply(a[i1:i2]>1, X=a, BATCHSIZE=5000,RETURN=T)
--
Mi³ego dnia
[[alternative HTML versio
It's not corect. Vector with length 15*10^6 you could store in memory without
ff packages.
For vector 15*10^7
k=bit(15*10^7)
a=ff(2,15*10^7)
system.time(k<-a[,chunk(1,length.ff(a),1e4)]<1)
Error: cannot allocate vector of size 572.2 Mb
In addition: Warning messages:
1: In system.time(k <- a[
2011/8/18 Krystian Radlak
>
> Mayby it's possible to do the same thing easier...
>
> You shouldn't be disappointed ;-)
> a=ff(1, length=15*10^6)
> k=bit(15*10^6)
> a=ff(2,15*10^6)
> system.time(k<-a[,chunk(1,length(a),1e4)]<1)
user system elapsed
0.40 0.23 0.72
--
Mi³ego dnia
[[altern
W dniu 18 sierpnia 2011 16:26 u¿ytkownik £ukasz Rêc³awowicz <
lukasz.reclawow...@gmail.com> napisa³:
>
> It should be ok.
>
It wasn't, sorry! This seems to do right job.
library(ff)
a=ff(1, length=15*10^2)
k=bit(15*10^2)
a=ff(-1,15*10^2)
system.time(k<-a[,i]<1)
--
Mi³ego dnia
[[alter
2011/8/18 Krystian Radlak
> Yes, it's necessery
>
Really? How about something like this:
system.time(k[i]<-a[i]<1)
It should be ok.
--
Mi³ego dnia
[[alternative HTML version deleted]]
__
R-devel@r-project.org mailing list
https://stat.eth
Yes, it's necessery. Operator < is not definied in ff packages.
str(a<1)
logi(0)
Mayby it's possible to do the same thing easier...
--
View this message in context:
http://r.789695.n4.nabble.com/Use-logical-expresion-on-ff-object-tp3752127p3752673.html
Sent from the R devel mailing list archiv
2011/8/18 Krystian Radlak
> Any suggestions?
>
Do you really, really need that loop and chunk...?!
--
Mi³ego dnia
[[alternative HTML version deleted]]
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel