tests/testthat/parse_comments/rplumber-in.R

# myfile.R

#* @get /mean
normalMean <- function(samples=10) {
  data <- rnorm(samples)
  mean(data)
}

#* @post /sum
addTwo <- function(a, b) {
  as.numeric(a) + as.numeric(b)
}

Try the styler package in your browser

Any scripts or data that you put into this service are public.

styler documentation built on Aug. 29, 2023, 5:10 p.m.