I'm trying to optimize my package to have minimum package dependencies. My first goal is to replicate separate()
function from tidyr
package. So for now I'm trying to understand its components.
Looking through it's code on github I'm getting stuck at understanding the UseMethod()
in:
separate <- function(data, col, into, sep = "[^[:alnum:]]+", remove = TRUE,
convert = FALSE, extra = "warn", fill = "warn", ...) {
UseMethod("separate")
}
-Where is UseMethod defined?
-It is not imported from another package, as far I can see.
and simplifyPieces()
:
simp <- simplifyPieces(pieces, n, fill == "left")
-Same for this fun, where is it defined? I don't see its code and what it should do.
-It is not imported from another package, as far I can see.
Thank you.