carry_forward: Carry spreadsheet values forward row-wise or column-wise

Description Usage Arguments

Description

carry_forward implements row-wise or column-wise last non-missing observation carried forward, in a table of tidy Excel data created by read_xlreturns() or tidyxl::xlsx_cells(). Usually called by as_header(), not directly.

Usage

1
2
3
4
5
6
carry_forward(.data, rows = TRUE, cols = TRUE, .by = "row",
  value.name = "value")

carry_right(.data, rows = TRUE, cols = TRUE, value.name = "value")

carry_down(.data, rows = TRUE, cols = TRUE, value.name = "value")

Arguments

.data

A table of tidy spreadsheet data (i.e., with columns row, col, and value).

rows

One of: a vector of spreadsheet row indexes; a logical vector with length equal to the row count of dataframe .data; or a length-one logical vector (i.e., TRUE or FALSE) applied to all spreadsheet rows.

cols

One of: a vector of spreadsheet column indexes; a logical vector with length equal to the column count of dataframe .data; or a length-one logical vector (i.e., TRUE or FALSE) applied to all spreadsheet columns

.by

Carry forward by "row" or by "col".

value.name

Column in .data to operate on.


MEDSL/medslcleaner documentation built on May 31, 2019, 7:39 a.m.