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