Displaying 2 results from an estimated 2 matches for "az2".
Did you mean:
a2
2012 May 26
2
avoid error within for loop, try, trycatch, while, move to next iteration, unlist
...es$lse" for example will warn me that the "$" operator will not work (since it is not numeric anymore I guess). Something like the following would fail, but I guess that clears what I want to do.
az1=unlist(res$lse[sapply(res$lse, function(x) !inherits(x, "try-error"))])
az2=unlist(res$lsp[sapply(res$lsp, function(x) !inherits(x, "try-error"))])
My final goal is to obtain 100 values of lse and 100 values of lsp. (Of course since the iterations leading to an error would be discarded I will end up with less than 100 iterations. Any ideas of also using the &quo...
2012 Apr 29
2
Count number of rows in a matrix with a character pattern
Hi,
I have a large data set that I input as a matrix, where I have 1:x rows
with names AX, then x+1: y rows named AY, etc. The idea is that I have to
count how many rows exactly I have with name AX and how many I have with
name AY (or find which row numbers have names AX). Is there any way in R to
count a number of rows with a name matching a required pattern?
Thanks in advance,
Katie
--