powered by
Convert a matrix to a cfda data.frame
matrixToCfd(X, times = NULL, labels = NULL, byrow = FALSE)
a data.frame in the cfda format
matrix containing the states
time values. If NULL, it uses a sequence of integers starting with 1
NULL
id labels. If NULL, it uses the matrix colnames
if FALSE, one column = one trajectory
FALSE
Other format: convertToCfd(), cut_data(), remove_duplicated_states()
convertToCfd()
cut_data()
remove_duplicated_states()
x <- matrix( c( "a", "b", "c", "c", "c", "a", "a", "a", "b", "c", "a", "b" ), ncol = 4, byrow = TRUE, dimnames = list(NULL, paste0("ind", 1:4)) ) matrixToCfd(x)
Run the code above in your browser using DataLab