From 9fb8a0eadef76d781910811c7cd1895beb79161f Mon Sep 17 00:00:00 2001 From: Emi Tanaka Date: Sun, 15 Oct 2023 15:22:15 +1100 Subject: [PATCH] rename fct_attrs to fct --- NAMESPACE | 1 + R/attrs.R | 7 +++++-- man/{fct_attrs.Rd => fct.Rd} | 7 +++++-- 3 files changed, 11 insertions(+), 4 deletions(-) rename man/{fct_attrs.Rd => fct.Rd} (91%) diff --git a/NAMESPACE b/NAMESPACE index 2f077bbf..31dc336e 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -106,6 +106,7 @@ export(examine_process_values) export(examine_recipe) export(expect_rcrds) export(export_design) +export(fct) export(fct_attrs) export(fct_edges) export(fct_generator) diff --git a/R/attrs.R b/R/attrs.R index c03c6679..da09c7ab 100644 --- a/R/attrs.R +++ b/R/attrs.R @@ -11,9 +11,9 @@ #' #' @seealso lvls #' @examples -#' fct_attrs(c("A", "B")) +#' fct(c("A", "B")) #' @export -fct_attrs <- function(.levels, ...) { +fct <- function(.levels, ...) { dots <- dots_list(..., .named = TRUE, .homonyms = "keep", .ignore_empty = "all") if(length(dots)) { @@ -30,6 +30,9 @@ fct_attrs <- function(.levels, ...) { .levels } +#' @rdname fct +#' @export +fct_attrs <- fct #' Setting the traits of the levels #' diff --git a/man/fct_attrs.Rd b/man/fct.Rd similarity index 91% rename from man/fct_attrs.Rd rename to man/fct.Rd index 1debbe97..99831b08 100644 --- a/man/fct_attrs.Rd +++ b/man/fct.Rd @@ -1,9 +1,12 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/attrs.R -\name{fct_attrs} +\name{fct} +\alias{fct} \alias{fct_attrs} \title{Setting the traits of factors} \usage{ +fct(.levels, ...) + fct_attrs(.levels, ...) } \arguments{ @@ -18,7 +21,7 @@ The values are added as attributes to the output object.} This function is used to set characteristics of the factors. } \examples{ -fct_attrs(c("A", "B")) +fct(c("A", "B")) } \seealso{ lvls