search for: values_vector

Displaying 1 result from an estimated 1 matches for "values_vector".

2007 Feb 26
1
match() function with a little enhancement
Dear R users, I was wondering if R has a built-in function doing the following : my_match(values_vector,lookup_vector) { for each value of values_vector : if value %in% lookup_vector, then value is unchanged else, value is changed the the closest element of lookup_vector, "closest" meaning "the one that would come just after if we sorted them using order()" } For example : valu...