Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

complete..html

Complete a data.table with missing combinations of data


Description

Turns implicit missing values into explicit missing values.

Usage

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

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))

tidytable

Tidy Interface to 'data.table'

v0.6.1
MIT + file LICENSE
Authors
Mark Fairbanks [aut, cre], Abdessabour Moutik [ctb], Matt Carlson [ctb], Ivan Leung [ctb], Ross Kennedy [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.