Hello all, I should probably know this by now... Anyway:
I have a large matrix (dim(data) is 3000 18000). In each element are one of the following character strings "0/0", "1/1", "1/2", "2/2". I wanted to replace "0/0" with NA and the other three with 0,1,2 respectively. To accomplish just the first of these four steps I did this: data[data=="0/0"] <- NA Which is still running after 13 hours. I have 18 GB RAM and running 64 bit R. What is a more efficient way to accomplish this (I've already done it using sed in UNIX - but want to know how to do so in R)? Thanks in advance, Matt -- Matthew C Keller Asst. Professor of Psychology University of Colorado at Boulder www.matthewckeller.com ______________________________________________ R-help@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.