Description Usage Arguments Value Author(s) References Examples
View source: R/trim_trailing.R
Removes value
from rightmost/leftmost elements of a vector.
1 2 3 | trim_trailing(x, value = 0)
trim_leading(x, value = 0)
|
x |
a vector |
value |
a value to strip from x |
a new vector, with values at the right removed
https://stackoverflow.com/questions/24009982/remove-zeros-in-the-start-and-end-of-a-vector/
1 | trim_leading(c(0,0,0,0,1:5))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.