File: tidy_rstudio.Rd

package info (click to toggle)
r-cran-formatr 1.14-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 376 kB
  • sloc: javascript: 19; sh: 10; makefile: 2
file content (27 lines) | stat: -rw-r--r-- 929 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tidy.R
\name{tidy_rstudio}
\alias{tidy_rstudio}
\title{Reformat R code in RStudio IDE}
\usage{
tidy_rstudio(...)
}
\arguments{
\item{...}{Arguments to be passed to \code{\link{tidy_source}()}, among which
the \code{indent} argument will respect the value you set for the number of
spaces for indentation in RStudio.}
}
\description{
If any R code is selected in the RStudio source editor, this function
reformats the selected code; otherwise it reformats the current open file (if
it is unsaved, it will be automatically saved).
}
\note{
If the output is not what you want, you can undo the change in the
  editor (Ctrl + Z or Command + Z).
}
\examples{\dontshow{if (interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf}
formatR::tidy_rstudio()
formatR::tidy_rstudio(args.newline = TRUE)
\dontshow{\}) # examplesIf}
}