Create a command to compress the space in the description

Can anyone suggest a command that can compress the space between the description (description is one of the column in the file uploaded)? In the description, the space is 10 spaces and I need to cut the space to be only one single space. Any help is appreciated. Thank you.

See FAQ: What's a reproducible example (`reprex`) and how do I do one? because it's helpful to know what object your column is in. Here's how you'd do it as a tibble.

desc <- as.tibble("             x")
desc %>% transmute(value = str_remove_all(.," "))
# A tibble: 1 x 1
1 x  

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.