Re: [R] Row binding

From: Patrick Burns <pburns_at_pburns.seanet.com>
Date: Thu, 10 Jun 2010 10:37:20 +0100

See 'The R Inferno' Circle 2 for why
this takes so long, and what to do
about it.

On 10/06/2010 08:35, makhdoomi wrote:
> hello
> i use the following code,but it is talking too much time to execute. It
> there any alternate code for the same.
> ##############################
> ############
>> names(bimas_epitopes)
>> dim(bimas_epitopes)
>> z6<-NULL;for ( i in 1:1496837) { if (bimas_epitopes[i,7]>39.99 )
> z6<-c(z6,i)}
>> length(z6)
> 112301
>> temp6<-NULL
>> temp6<-z6[1]
>> result6<-bimas_epitopes[temp6,]
>> for ( i in 2:112301) {
> temp6<-z6[i];result6<-rbind(result6,bimas_epitopes[temp6,])}####this code is
> talking toooooo much time for row binding########
> #############################################
> need the alternate if u can help.
>

-- 
Patrick Burns
pburns_at_pburns.seanet.com
http://www.burns-stat.com
(home of 'Some hints for the R beginner'
and 'The R Inferno')

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Thu 10 Jun 2010 - 09:39:24 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 10 Jun 2010 - 22:50:28 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive