Learn R Programming

wlsd (version 1.0.1)

basedate: Create Baseline Row

Description

Creates a new row of values for subjects representing baseline observations in a data set of follow-up observations.

Usage

basedate(data,id)

Value

A data frame with added row for each level of id.

Arguments

data

Data frame with relevant columns.

id

Character string of the identification column name in data.

Details

Adds a new row for each level of the id column. Internal functions will try to determine any constant columns by checking for consistency within id groups in order to fill in some of the blanks.

Examples

Run this code
basedate(long_data, "id")

Run the code above in your browser using DataLab