I would like to close in double parenthesis the second column I am trying to unite
library(tidyr)
mtcars %>%
summarise(mean = mean(mpg),
sd = sd(mpg)) %>%
tidyr::unite('A', 1:2, sep = ' (')
On this purpose I am using the sep argument but I do not know whether it is possible somehow or not using this method. If not could you please provide some other example?
This is the desired output
A
1 20.090625 (6.0269480520891)
I think
paste,sprintf, andglueare all more natural choices thanunitefor this.