powered by
Remove elements by number of characters
rm_nchar(x, least, most)
removed vector
one vector
least number of characters
most number of characters
x <- c('a','abc','abcd',NA) rm_nchar(x,least = 1) rm_nchar(x,most = 4) rm_nchar(x,least = 1, most = 4)
Run the code above in your browser using DataLab