Skip to content

Instantly share code, notes, and snippets.

@cecilesauder
Created December 19, 2018 11:15
Show Gist options
  • Save cecilesauder/e62db9d32b118e5f799e2b93541755b9 to your computer and use it in GitHub Desktop.
Save cecilesauder/e62db9d32b118e5f799e2b93541755b9 to your computer and use it in GitHub Desktop.
commentje fais pour pas avoir de "," a la fin ?
``` r
library(glue)
names = c("var1", "var2", "var3")
glue_index <- function(vect_names){
glue('"{vect_names}" = 4,')
}
glue_index(names)
#> "var1" = 4,
#> "var2" = 4,
#> "var3" = 4,
```
<sup>Created on 2018-12-19 by the [reprex package](https://reprex.tidyverse.org) (v0.2.1)</sup>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment