Reputation: 507
I have a patch variable made of different possible strings imported from a shp file. In some cases, it contains a NaN
value that I want to replace with another string. If the variable was of numbers, I could use:
ifelse (value <= 0) or (value >= 0)
to identify a NaN
, but in this case it is a string. Any ideas? Thanks
Javier
Upvotes: 2
Views: 201
Reputation: 12580
Is there a reason:
if value = "NaN"
won't work?
The is-number?
and is-string?
reporters may be useful to you as well.
Upvotes: 4