From f09c544af3a9929540d821fca09c32616ac1b7a1 Mon Sep 17 00:00:00 2001 From: Jon Harmon Date: Fri, 8 May 2026 10:38:38 -0500 Subject: [PATCH] docs: clarify `.fill` arg - Closes #229 --- R/aaa-shared_params.R | 3 ++- man/dot-format_fill_arg.Rd | 3 ++- man/dot-format_tib_parts.Rd | 3 ++- man/dot-shared-params.Rd | 3 ++- man/dot-tib_scalar_impl.Rd | 3 ++- man/dot-tib_vector_impl.Rd | 3 ++- man/formatting.Rd | 3 ++- man/tib_spec.Rd | 3 ++- 8 files changed, 16 insertions(+), 8 deletions(-) diff --git a/R/aaa-shared_params.R b/R/aaa-shared_params.R index 74fc1f50..4fd3afe3 100644 --- a/R/aaa-shared_params.R +++ b/R/aaa-shared_params.R @@ -30,7 +30,8 @@ #' @param field_spec (`tib_collector`) A tibblify field collector. #' @param file (`character(1)`) A path to a file, a connection, or literal data. #' @param .fill (`vector` or `NULL`) Optionally, a value to use if the field -#' does not exist. +#' does not exist. Note: this value must match the `.ptype_inner` of the field +#' (the value *before* any transformation), not the `.ptype`. #' @param force_names (`logical(1)`) Should names be printed even if they can be #' deduced from the spec? #' @param .format (`character(1)` or `NULL`) Passed to the `format` argument of diff --git a/man/dot-format_fill_arg.Rd b/man/dot-format_fill_arg.Rd index 44b1bb78..f76b4e54 100644 --- a/man/dot-format_fill_arg.Rd +++ b/man/dot-format_fill_arg.Rd @@ -10,7 +10,8 @@ \item{x}{A tibblify collector object.} \item{.fill}{(\code{vector} or \code{NULL}) Optionally, a value to use if the field -does not exist.} +does not exist. Note: this value must match the \code{.ptype_inner} of the field +(the value \emph{before} any transformation), not the \code{.ptype}.} } \value{ (\code{character(1)} or \code{NULL}) The formatted fill string, or \code{NULL} if diff --git a/man/dot-format_tib_parts.Rd b/man/dot-format_tib_parts.Rd index b37ba991..7e35c341 100644 --- a/man/dot-format_tib_parts.Rd +++ b/man/dot-format_tib_parts.Rd @@ -26,7 +26,8 @@ forwarded from the calling \verb{format.*} method.} \item{.fill}{(\code{vector} or \code{NULL}) Optionally, a value to use if the field -does not exist.} +does not exist. Note: this value must match the \code{.ptype_inner} of the field +(the value \emph{before} any transformation), not the \code{.ptype}.} \item{.ptype_inner}{(\code{vector(0)}) A prototype of the input field.} diff --git a/man/dot-shared-params.Rd b/man/dot-shared-params.Rd index 045d0c13..94a2f611 100644 --- a/man/dot-shared-params.Rd +++ b/man/dot-shared-params.Rd @@ -45,7 +45,8 @@ wrapped.} \item{file}{(\code{character(1)}) A path to a file, a connection, or literal data.} \item{.fill}{(\code{vector} or \code{NULL}) Optionally, a value to use if the field -does not exist.} +does not exist. Note: this value must match the \code{.ptype_inner} of the field +(the value \emph{before} any transformation), not the \code{.ptype}.} \item{force_names}{(\code{logical(1)}) Should names be printed even if they can be deduced from the spec?} diff --git a/man/dot-tib_scalar_impl.Rd b/man/dot-tib_scalar_impl.Rd index 3b8b1806..341f6e17 100644 --- a/man/dot-tib_scalar_impl.Rd +++ b/man/dot-tib_scalar_impl.Rd @@ -25,7 +25,8 @@ field.} \item{.required}{(\code{logical(1)}) Throw an error if the field does not exist?} \item{.fill}{(\code{vector} or \code{NULL}) Optionally, a value to use if the field -does not exist.} +does not exist. Note: this value must match the \code{.ptype_inner} of the field +(the value \emph{before} any transformation), not the \code{.ptype}.} \item{.ptype_inner}{(\code{vector(0)}) A prototype of the input field.} diff --git a/man/dot-tib_vector_impl.Rd b/man/dot-tib_vector_impl.Rd index 9895933f..fd6fb515 100644 --- a/man/dot-tib_vector_impl.Rd +++ b/man/dot-tib_vector_impl.Rd @@ -29,7 +29,8 @@ field.} \item{.required}{(\code{logical(1)}) Throw an error if the field does not exist?} \item{.fill}{(\code{vector} or \code{NULL}) Optionally, a value to use if the field -does not exist.} +does not exist. Note: this value must match the \code{.ptype_inner} of the field +(the value \emph{before} any transformation), not the \code{.ptype}.} \item{.ptype_inner}{(\code{vector(0)}) A prototype of the input field.} diff --git a/man/formatting.Rd b/man/formatting.Rd index 5ec67b59..14d39547 100644 --- a/man/formatting.Rd +++ b/man/formatting.Rd @@ -85,7 +85,8 @@ output to generate.} deduced from the spec?} \item{.fill}{(\code{vector} or \code{NULL}) Optionally, a value to use if the field -does not exist.} +does not exist. Note: this value must match the \code{.ptype_inner} of the field +(the value \emph{before} any transformation), not the \code{.ptype}.} \item{.ptype_inner}{(\code{vector(0)}) A prototype of the input field.} diff --git a/man/tib_spec.Rd b/man/tib_spec.Rd index d4ea379a..ddca3f8a 100644 --- a/man/tib_spec.Rd +++ b/man/tib_spec.Rd @@ -313,7 +313,8 @@ field.} \item{.required, required}{(\code{logical(1)}) Throw an error if the field does not exist?} \item{.fill, fill}{(\code{vector} or \code{NULL}) Optionally, a value to use if the field -does not exist.} +does not exist. Note: this value must match the \code{.ptype_inner} of the field +(the value \emph{before} any transformation), not the \code{.ptype}.} \item{.ptype_inner, ptype_inner}{(\code{vector(0)}) A prototype of the input field.}