Created
December 19, 2018 11:15
-
-
Save cecilesauder/e62db9d32b118e5f799e2b93541755b9 to your computer and use it in GitHub Desktop.
commentje fais pour pas avoir de "," a la fin ?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` 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