From radler12 at op.pl  Fri Aug 19 11:03:03 2011
From: radler12 at op.pl (Krystian Radlak)
Date: Fri, 19 Aug 2011 02:03:03 -0700 (PDT)
Subject: [Rd] Use logical expresion on ff object
In-Reply-To: <CAE2rZE=yzAvsMF9_HRYMSULQXYEG3Lm-cXf0CBpqPQWxc51hKA@mail.gmail.com>
References: <1313658599381-3752127.post@n4.nabble.com>
	<CAE2rZEkqJHPv2Totn-1O0HSbO=g_JY-b731VKhrz7bTBpL0VfQ@mail.gmail.com>
	<1313675837352-3752673.post@n4.nabble.com>
	<CAE2rZE=yzAvsMF9_HRYMSULQXYEG3Lm-cXf0CBpqPQWxc51hKA@mail.gmail.com>
Message-ID: <1313744583548-3754673.post@n4.nabble.com>

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[, chunk(1, length.ff(a), 10000)] < 1) :
  Reached total allocation of 1535Mb: see help(memory.size)
2: In system.time(k <- a[, chunk(1, length.ff(a), 10000)] < 1) :
  Reached total allocation of 1535Mb: see help(memory.size)
3: In system.time(k <- a[, chunk(1, length.ff(a), 10000)] < 1) :
  Reached total allocation of 1535Mb: see help(memory.size)
4: In system.time(k <- a[, chunk(1, length.ff(a), 10000)] < 1) :
  Reached total allocation of 1535Mb: see help(memory.size)
Timing stopped at: 2.13 0.84 10.45 

And you don't understand my question. In simple operation in R I could do:
a=c(1,4,5,6)
b=a[a>1]
b
[1] 4 5 6

If a is ff object (for example length=15*10^7) this operation doesn't work.
Mayby I don't understand something or this operation is not definied
currently in this package. 
In summarizing:
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). 

--
View this message in context: http://r.789695.n4.nabble.com/Use-logical-expresion-on-ff-object-tp3752127p3754673.html
Sent from the R devel mailing list archive at Nabble.com.



[Rd] Use logical expresion on ff object
Krystian Radlak