powered by
repo_style implements "non-invasive pretty-printing of R source code" of .R or .Rmd files within a repository using the styler package and adhering to tidyverse formatting guidelines.
repo_style
styler
tidyverse
repo_style( repo, files = c("*.R", "*.Rmd"), branch = "styler", base, create_pull_request = TRUE, draft = TRUE, tag_collaborators = TRUE, prompt = TRUE )
The functions returns NULL invisibly.
Character. Address of repository in "owner/name" format.
Character or vector of characters. Names of .R and/or .Rmd files that styler should be applied to.
Character. Name of new branch to be created or overwritten. Default is "styler".
Character. Name of branch that contains the .R and/or .Rmd files to be styled
Logical. If TRUE, a pull request is created from branch to base. Default TRUE.
TRUE
Logical. Should the pull request be created as a draft pull request? (Draft PRs cannot be merged until allowed by the author) Default TRUE.
Logical. If TRUE, a message with the repository collaborators is displayed. Default TRUE.
Logical. Prompt the user before overwriting an existing branch. Default TRUE.
if (FALSE) { repo_style("ghclass-test/hw1-team01", base = "main") }
Run the code above in your browser using DataLab