From 4b61301ebfa40336f07c63c5983b35cfcbc53d55 Mon Sep 17 00:00:00 2001 From: edhell Date: Thu, 1 Jun 2023 17:55:33 -0300 Subject: [PATCH] consolidate codegen documentation to fix pkgdown --- R/codegen.R | 6 +++--- man/codegen.Rd | 15 ++++++++++++++- man/codegen.glm.Rd | 11 ----------- man/codegen.lm.Rd | 11 ----------- 4 files changed, 17 insertions(+), 26 deletions(-) delete mode 100644 man/codegen.glm.Rd delete mode 100644 man/codegen.lm.Rd diff --git a/R/codegen.R b/R/codegen.R index a45c0b1..cd1e53d 100644 --- a/R/codegen.R +++ b/R/codegen.R @@ -1,5 +1,5 @@ -#' SAS standard score code generation \strong{(EXPERIMENTAL)} +#' SAS standard score code generation Generic Function \strong{(EXPERIMENTAL)} #' #' @description #' @@ -32,7 +32,7 @@ codegen <- function(model, path, rds, ...) { UseMethod("codegen") } -#' Code generator for Linear models +#' @describeIn codegen Code generator for Linear models #' @export codegen.lm <- function(model, path = "scoreCode.R", rds = "model.rds") { @@ -70,7 +70,7 @@ codegen.lm <- function(model, path = "scoreCode.R", rds = "model.rds") { invisible(scorecode) } -#' Code generator for General Linear models, specifically logistic regression +#' @describeIn codegen generator for `glm` General Linear models, specifically logistic regression #' @export codegen.glm <- function(model, path = "scoreCode.R", rds = "model.rds", cutoff = 0.5) { diff --git a/man/codegen.Rd b/man/codegen.Rd index ad82e2c..c567a40 100644 --- a/man/codegen.Rd +++ b/man/codegen.Rd @@ -2,9 +2,15 @@ % Please edit documentation in R/codegen.R \name{codegen} \alias{codegen} -\title{SAS standard score code generation \strong{(EXPERIMENTAL)}} +\alias{codegen.lm} +\alias{codegen.glm} +\title{SAS standard score code generation Generic Function \strong{(EXPERIMENTAL)}} \usage{ codegen(model, path, rds, ...) + +\method{codegen}{lm}(model, path = "scoreCode.R", rds = "model.rds") + +\method{codegen}{glm}(model, path = "scoreCode.R", rds = "model.rds", cutoff = 0.5) } \arguments{ \item{model}{model object (lm, glm ...)} @@ -25,6 +31,13 @@ Score code will only be generated successfully for supported models. Other models and frameworks will be added in due time. Use \code{\link[=create_scoreSample]{create_scoreSample()}} to get a structure sample } +\section{Methods (by class)}{ +\itemize{ +\item \code{codegen(lm)}: Code generator for Linear models + +\item \code{codegen(glm)}: generator for \code{glm} General Linear models, specifically logistic regression + +}} \examples{ # SAS viya doesn't play nice with variables with '.' in the names diff --git a/man/codegen.glm.Rd b/man/codegen.glm.Rd deleted file mode 100644 index 90f5731..0000000 --- a/man/codegen.glm.Rd +++ /dev/null @@ -1,11 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/codegen.R -\name{codegen.glm} -\alias{codegen.glm} -\title{Code generator for General Linear models, specifically logistic regression} -\usage{ -\method{codegen}{glm}(model, path = "scoreCode.R", rds = "model.rds", cutoff = 0.5) -} -\description{ -Code generator for General Linear models, specifically logistic regression -} diff --git a/man/codegen.lm.Rd b/man/codegen.lm.Rd deleted file mode 100644 index 6889ca1..0000000 --- a/man/codegen.lm.Rd +++ /dev/null @@ -1,11 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/codegen.R -\name{codegen.lm} -\alias{codegen.lm} -\title{Code generator for Linear models} -\usage{ -\method{codegen}{lm}(model, path = "scoreCode.R", rds = "model.rds") -} -\description{ -Code generator for Linear models -}