tile.Rd
Tiling window without overlapping observations:
tile()
always returns a list.
tile_lgl()
, tile_int()
, tile_dbl()
, tile_chr()
use the same
arguments as tile()
, but return vectors of the corresponding type.
tile_dfr()
tile_dfc()
return data frames using row-binding & column-binding.
tile(.x, .f, ..., .size = 1, .bind = FALSE) tile_dfr(.x, .f, ..., .size = 1, .bind = FALSE, .id = NULL) tile_dfc(.x, .f, ..., .size = 1, .bind = FALSE)
.x | An object to slide over. |
---|---|
.f | A function, formula, or vector (not necessarily atomic). If a function, it is used as is. If a formula, e.g.
This syntax allows you to create very compact anonymous functions. If character vector, numeric vector, or list, it is
converted to an extractor function. Character vectors index by
name and numeric vectors index by position; use a list to index
by position and name at different levels. If a component is not
present, the value of |
... | Additional arguments passed on to the mapped function. |
.size | An integer for window size. If positive, moving forward from left to right; if negative, moving backward (from right to left). |
.bind | If |
.id | Either a string or Only applies to |
Other tiling window functions: tile2
#> [1] 1.5 3.5 5.0#> [1] FALSE TRUE TRUEtile(lst, ~ ., .size = 2)#> [[1]] #> [[1]]$x #> [1] 1 2 3 4 5 #> #> [[1]]$y #> [1] 6 7 8 9 10 #> #> #> [[2]] #> [[2]]$z #> [1] 11 12 13 14 15 #> #>