paste_missing: Concatenate strings dropping missing values

View source: R/paste_missing.R

paste_missingR Documentation

Concatenate strings dropping missing values

Description

Concatenate strings dropping missing values

Usage

paste_missing(
  ...,
  sep = " ",
  collapse = NULL,
  missing_values = NA,
  paste_last = FALSE
)

Arguments

..., sep, collapse

See ?paste

missing_values

Values considered missing to be ignored in pasting.

paste_last

When all ... arguments have been combined and only one remains, should paste be called on that last argument? (Ignored if collapse is not NULL.)

Details

If all values are missing, the value from the first argument is preserved. paste_last affects the final output; the main difference is that if FALSE, NA_character_ values will be preserved, and if TRUE, NA_character_ values will be converted to "NA" (as is the case with paste()).

Value

A character vector of pasted values.


billdenney/bsd.report documentation built on Jan. 16, 2024, 12:54 a.m.