You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
800B

  1. % Generated by roxygen2: do not edit by hand
  2. % Please edit documentation in R/stats.R
  3. \name{statify}
  4. \alias{statify}
  5. \title{Transform any function into a valid stat function for the table}
  6. \usage{
  7. statify(x, f)
  8. }
  9. \arguments{
  10. \item{x}{A vector}
  11. \item{f}{The function to try to apply, or a formula combining two functions}
  12. }
  13. \value{
  14. The results for the function applied on the vector, compatible with the format of the result table
  15. }
  16. \description{
  17. Transform a function into a valid stat function for the table
  18. }
  19. \details{
  20. NA values are removed from the data
  21. Applying the function on a numerical vector should return one value
  22. Applying the function on a factor should return nlevels + 1 value, or one value per factor level
  23. See \code{parse_formula} for the usage for formulaes.
  24. }
  25. \keyword{internal}