Displaying 1 result from an estimated 1 matches for "prhisinfinite".
2010 Sep 27
1
make changes in existing vector with the apply function?
Hi, I'm trying to make some changes in a vector according to some conditions. It takes too long time however with vector length > 100000 and I guess a better way would be using the apply function. I cannot sort out how, however.
As a for/if loop:
for (i in 1:length(PrH)) {
if (is.finite(PrH[i]) == F & tempHER > tempSPR) {PrH[i] <- 1 }
if (is.finite(PrH[i]) == F & tempHER <