Ulrich wrote:
Hi,
is it possible to easily change the return value for the grep function
for cases where there is no match, for example the value 0 or No
instead of integer (0) )?
It sounds like you might want grepl (which returns a vector of TRUE and
FALSE values) rather than grep
Hi,
is it possible to easily change the return value for the grep function
for cases where there is no match, for example the value 0 or No
instead of integer (0) )?
Thanks, Uli
__
R-help@r-project.org mailing list
On Oct 30, 2010, at 10:51 PM, Ulrich wrote:
Hi,
is it possible to easily change the return value for the grep
function for cases where there is no match, for example the value 0
or No instead of integer (0) )?
Seems like is should be pretty easy. Test for length(grep(...)) == 0
or
On Sat, Oct 30, 2010 at 10:51 PM, Ulrich ulrich.schle...@stanford.edu wrote:
Hi,
is it possible to easily change the return value for the grep function for
cases where there is no match, for example the value 0 or No instead of
integer (0) )?
Try this:
Find(length, list(grep(X, letters),
On Oct 30, 2010, at 11:13 PM, David Winsemius wrote:
On Oct 30, 2010, at 10:51 PM, Ulrich wrote:
Hi,
is it possible to easily change the return value for the grep
function for cases where there is no match, for example the value 0
or No instead of integer (0) )?
Seems like is
5 matches
Mail list logo