replace_caps()
replaces the first and/or last element of a vector.
Arguments
- x
An
atomic
vector.- replacement
(optional) A value to replace the first and/or last element of
x
with (default:NA
).- start
(optional) A
logical
flag indicating whether to remove the first element ofx
(default:TRUE
).- end
(optional) A
logical
flag indicating whether to remove the last element ofx
(default:TRUE
).
See also
Other vector functions:
cut_vector()
,
remove_caps()
,
split_by_pattern()