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 = "master", create_pull_request = TRUE, draft = TRUE, tag_collaborators = TRUE, prompt = TRUE )
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.
Logical. Should the pull request be created as a draft pull request? (Draft PRs cannot be merged until allowed by the author)
Logical. If TRUE, a message with the repository collaborators is displayed.
Chacacter. Prompt the user before overwriting an existing branch.
# NOT RUN { style_repo("Sta523-Fa17/base_hw1", files = c("hw1_sample.Rmd")) # } # NOT RUN { # }
Run the code above in your browser using DataLab