Create snippets in R

PHOTO EMBED

Sun May 22 2022 16:32:49 GMT+0000 (Coordinated Universal Time)

Saved by @Treenose #r

usethis::edit_rstudio_snippets()

#Use this syntax
snippet plonger #Snippet name
	pivot_longer(${1:mydf},
	             cols = ${2:columns to pivot long},
	             names_to = "${3:desired name for category column}",
	             values_to = "${4:desired name for value column}"
	)
content_copyCOPY

https://www.infoworld.com/article/3637083/never-look-up-tidyrs-pivotwider-or-pivotlonger-again.html