how to add comma to string vector?
Thank you.
```
raws <- c("field_1", "field_2", "field_3")
paste0("['", paste0(raws, collapse="', '"), "']")
```
gave the most fitting option...
On Fri, Jun 10, 2022 at 12:31 PM Rasmus Liland <jral at posteo.no> wrote:
Hello ...
raws <- c("field_1", "field_2", "field_3")
paste0("['", paste0(raws, collapse="', '"), "']")
rasmus at eightforty ~ % python
Python 3.10.5 (main, Jun 6 2022, 18:49:26) [GCC 12.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
['field_1', 'field_2', 'field_3']
['field_1', 'field_2', 'field_3'] ? R
Best regards, Luigi