On Jul 28, 2010, at 12:09 AM, jd6688 wrote:
d <- apply(s, 2, sample, size = 1*nrow(s), replace = TRUE)
why the code above return the following error
Error: cannot allocate vector of size 218.8 Mb
Possibilities:
Your workspace is full of other junk?
Your workspace used to be full of oth
On Jul 27, 2010, at 6:44 PM, jd6688 wrote:
I am trying to do the following to accomplish the tasks, can anybody
to
simplify the solutions.
Thanks,
for (i in 1:1){
d<-apply(s,2,sample)
pos_neg_tem<-t(apply(d,1,doit))
if (i>1){
pos_neg_pool<-rbind(pos_neg_pool,pos_neg_tem)
}else{
d <- apply(s, 2, sample, size = 1*nrow(s), replace = TRUE)
why the code above return the following error
Error: cannot allocate vector of size 218.8 Mb
--
View this message in context:
http://r.789695.n4.nabble.com/re-sampling-of-large-sacle-data-tp2304165p2304413.html
Sent from the R he
It looks to me like you keep sampling from some dataset 's' 10,000
times. Since you can sample() with replacement, I wonder if you could
just take a sample of the size you want, rather than using a loop with
sample. Perhaps along these lines:
d <- apply(s, 2, sample, size = 1*nrow(s), replac
I am trying to do the following to accomplish the tasks, can anybody to
simplify the solutions.
Thanks,
for (i in 1:1){
d<-apply(s,2,sample)
pos_neg_tem<-t(apply(d,1,doit))
if (i>1){
pos_neg_pool<-rbind(pos_neg_pool,pos_neg_tem)
}else{
pos_neg_pool<- pos_neg_tem
}}
--
View
Write a function that incorporates "doit" and the column shuffle.
Let's call it "doitbetter"
replicate(1, doitbetter())
You'll probably want to read the help for "replicate" to make sure the
defaults are what you want.
--Gray
On Tue, Jul 27, 2010 at 4:43 PM, jd6688 wrote:
>
> myDF:
>
> d1
myDF:
d1 d2 d3 d4
d5
-0.1669103510.022304377 -0.00825924 0.008330689 -0.000925938
-0.1669103510.022304377 -0.00825924 0.008330689 -0.000925938
-0.1669103510.022304377 -0.00825924 0.0
7 matches
Mail list logo