On 19/02/2009 9:26 AM, Stefan Uhmann wrote:
Dear List,
I have this column/vector:
vec <- c("function", "missing", "string")
and want to compute a second column/vector:
- value if the pattern "unc" is found: 1
- value if the pattern "iss" is found: 2
- value if none of the patterns is found: 0
Dear List,
I have this column/vector:
vec <- c("function", "missing", "string")
and want to compute a second column/vector:
- value if the pattern "unc" is found: 1
- value if the pattern "iss" is found: 2
- value if none of the patterns is found: 0
This should be the result:
> vec2
[1] 1 2 0
2 matches
Mail list logo