search for: coercable

Displaying 2 results from an estimated 2 matches for "coercable".

2011 Oct 18
1
Function to "lump" factors together?
...f "branch" -- using "UNK" as a default if nothing else matched. Mind, the patterns there are "Shell Patterns" ("globs"), not regular expressions. I've looked at R functions match(), pmatch(), charmatch(), and switch(); while each looks as it it might be coercable to get the result I want, it also looks to require iteration over the thousands of entries I have -- as well as using the functions in question in a fairly "unnatural" way. I could also write my own function that iterates over the entries, generating factors from the branch names -- but...
1999 Jan 20
0
dist(*, "euclidean") [was "dist function suggestion"]
...Y=myY) > would work > one could even make it such that > both > dist(X, myY) > and dist(X, "euclidean") > would work. However, the extra hack for dist(X, Y) Um, I did think about that, but precisely what would be rules be? For now the second argument can be anything coercable to a character (why is match.arg not used?), or should be since ?pmatch says x: the values to be matched. without mentioning mode, although the internal code has isString (whatever precisely that is). In particular, names fail in R but not S, although as documented they should work in R b...