Hi all,
Quick question regarding how to automate a process I currently have to do by hand. I have a function that I created to create APA formatted flextable's of Bayesian models and it's almost complete, except for a few more things.
The following line is part of a larger script I wrote to build my tables. It unites the two 95% Highest Density Interval columns (i.e. the upper and lower bounds):
unite("89% HDI", CI_low:CI_high, sep = ", ", remove = TRUE, na.rm = FALSE) %>%
select(-(CI))
But I would like to add something in here to automatically add brackets around the output, in true APA style.
Currently, output for each row currently looks like: x, y
And I'd like it to look like: [x, y]
Is there a way to get R to enclose each row's results with brackets so I don't have to do it myself in Word later?