prepare_life_times: Bulk life time preparatio.

Description Usage Arguments Details Value Examples

View source: R/prepares_life_times.R

Description

Prepare life times for each individual in the dataset

Usage

1
2
prepare_life_times(data, indiv_col = "indiv", status_col = "status",
  obs_time_col = "obs_time")

Arguments

data:

A data.frame to be prepared

indiv_col:

column containing the identification of the individual.

obs_time_col:

Observed time of the event

status_col:

Event (O suspension, 1 "death")

Details

The codes calls prepare_indiv_life_times for each individual.

Value

A data.frame conatining the prepared data.

Examples

1
2
3
4
5
6
7
8
da = system.file("extdata", "example.csv", package = "reliabilitytools")
da = read.csv2(da)

da %>%
  mutate(status = as.integer(failure_cause_group == 560)) %>%
  prepare_life_times(indiv_col = 'id'
                     , status_col = 'status'
                     , obs_time_col = 'cycles')

leonardommarques/reliabilitytools documentation built on Aug. 1, 2019, 8:03 p.m.