From 9c2ee51fd7cc0e42efe28e9803197f85378a1f9c Mon Sep 17 00:00:00 2001 From: Phuong Quan Date: Thu, 4 Apr 2024 17:24:35 +0100 Subject: [PATCH] minor tidying --- R/field_types.R | 5 ++--- man/field_types_advanced.Rd | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/R/field_types.R b/R/field_types.R index 6260d90..52ad30d 100644 --- a/R/field_types.R +++ b/R/field_types.R @@ -61,7 +61,7 @@ field_types <- function(...) { # ----------------------------------------------------------------------------- -#' Create field_types specification (for advanced users) +#' Create field_types_advanced specification #' #' Specify only a subset of the names and types of fields in the source data frame. The remaining #' fields will be given the same 'default' type. @@ -82,8 +82,7 @@ field_types <- function(...) { #' @export field_types_advanced <- function(..., .default_field_type = ft_simple()) { - fts <- list(...) - fts[[".default_field_type"]] <- .default_field_type + fts <- list(..., ".default_field_type" = .default_field_type) err_validation <- field_types_problems(fts) diff --git a/man/field_types_advanced.Rd b/man/field_types_advanced.Rd index 619e7ee..16fa731 100644 --- a/man/field_types_advanced.Rd +++ b/man/field_types_advanced.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/field_types.R \name{field_types_advanced} \alias{field_types_advanced} -\title{Create field_types specification (for advanced users)} +\title{Create field_types_advanced specification} \usage{ field_types_advanced(..., .default_field_type = ft_simple()) }