complete.: Complete a data.table with missing combinations of data

Description Usage Arguments Examples

View source: R/complete.R

Description

Turns implicit missing values into explicit missing values.

Usage

1
complete.(.df, ..., fill = list())

Arguments

.df

A data.frame or data.table

...

Columns to expand

fill

A named list of values to fill NAs with.

Examples

1
2
3
4
5
6
7
test_df <- data.table(x = 1:2, y = 1:2, z = 3:4)

test_df %>%
  complete.(x, y)

test_df %>%
  complete.(x, y, fill = list(z = 10))

mtfairbanks/gdt documentation built on May 4, 2021, 9:44 a.m.