# Example 1 - Based on an existing data.frame/tibble and column names:
data <- reliability_data(
data = shock,
x = distance,
status = status
)
# Example 2 - Based on an existing data.frame/tibble and column positions:
data_2 <- reliability_data(
data = shock,
x = 1,
status = 3
)
# Example 3 - Keep all variables of the tibble/data.frame entered to argument data:
data_3 <- reliability_data(
data = shock,
x = distance,
status = status,
.keep_all = TRUE
)
# Example 4 - Based on vectors:
cycles <- alloy$cycles
state <- alloy$status
id <- "XXXXXX"
data_4 <- reliability_data(
x = cycles,
status = state,
id = id
)
Run the code above in your browser using DataLab