pad_list: Pad a vector or list of vector with NAs to a given length.

View source: R/pad_list.R

pad_listR Documentation

Pad a vector or list of vector with NAs to a given length.

Description

Pad a vector or list of vector with NAs to a given length.

Usage

pad_list(x, length.out = NULL, pad = NA)

Arguments

x

A list of vector to pad.

length.out

integer: The length of vector after padding. Optional. If missing, takes the length of the longer list item.

pad

The value to fill the vector(s) with. Default is NA.

Value

a list or vector depending on input

Examples

## Not run: 
li <- list(a = 1)

## End(Not run)

salix-d/salixUtils documentation built on Aug. 14, 2024, 7:11 a.m.