ys_fill_dots: Supplement data in dots list with default values

View source: R/ys-tidy.R

ys_fill_dotsR Documentation

Supplement data in dots list with default values

Description

Please avoid thinking of this function as a way to mutate dots. It sort of is but not in the way you think. It really is for supplementing the spec so that downstream functions are guaranteed to find these names with sensible values for every column in the spec. mutate will be a different function.

Usage

ys_fill_dots(x, ..., .overwrite = FALSE)

Arguments

x

A yspec object.

...

name = value data to be added to dots.

.overwrite

Logical indicating whether x should be overwritten with data in ....

Details

By default, this function will not overwrite data in dots when it already exists. This behavior can be changed with the .overwrite argument. Note that when .overwrite is TRUE, all columns in the spec will have the same value in dots for the name getting set.

Value

A yspec object with modified .dots

Examples

spec <- ys_help$spec()

spec2 <- ys_fill_dots(spec, new_var = FALSE)


metrumresearchgroup/yspec documentation built on May 24, 2024, 12:48 a.m.