Learn R Programming

pammtools (version 0.1.14)

tidyr_verbs: tidyr Verbs for ped-Objects

Description

See tidyr documentation of the respective functions for description and examples.

Usage

# S3 method for ped
fill(data, ..., .direction = c("down", "up", "downup",
  "updown"), keep_attributes = TRUE)

# S3 method for nested_fdf fill(data, ..., .direction = c("down", "up"), keep_attributes = TRUE)

Arguments

data

an object of class ped, see as_ped.

...

A selection of columns. If empty, nothing happens. You can supply bare variable names, select all variables between x and z with x:z, exclude y with -y. For more selection options, see the dplyr::select() documentation.

.direction

Direction in which to fill missing values. Currently either "down" (the default), "up", "downup" (i.e. first down and then up) or "updown" (first up and then down).

keep_attributes

conserve attributes? defaults to TRUE.

Value

A modified ped object.