From: Denise Xifara <dionysia-kiara.xifaras_at_st-hildas.ox.ac.uk>

Date: Mon, 28 Jul 2008 14:15:13 +0100

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 Mon 28 Jul 2008 - 13:19:58 GMT

Date: Mon, 28 Jul 2008 14:15:13 +0100

Given a dataset that I have called dat, I was hoping to speed up the following loop:

for(i in 1:835353){

if (is.na(dat[i,4])==TRUE){dat[i,4]<-0 }}

it takes ridiculously long to process, so I was hoping that there would be a quicker way to do this.

Thank you all very much for the help,

Denise

[[alternative HTML version deleted]]

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 Mon 28 Jul 2008 - 13:19:58 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 Mon 28 Jul 2008 - 15:02:42 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.
*