matchtime | R Documentation |
The function takes a variable x
(e.g. a vector or a list object), and reorders it to best match the dates provided in a vector y
.
matchtime(x, y, ...) ## S4 method for signature 'numeric' matchtime(x, y, index = FALSE, ...) ## S4 method for signature 'character' matchtime(x, y, index = FALSE, ...) ## S4 method for signature 'list' matchtime(x, y, index = FALSE, ...)
x |
Object to be reordered to match |
y |
( |
... |
Additional arguments passed to class-specific methods. |
index |
( |
An object of the class as x
or a numeric
vector.
# original vector orig <- 1:10 # target values targ <- c(5.1,4.2, 3.4, 2.7, 2.3) # how do the two series match the best? matchtime(orig, targ)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.