Coerce sgb_data
to Data Frame.
as_tibble.sgb_data(x, ...)
x | an |
---|---|
... | Currently not used |
a tibble
library(tibble) df = data.frame(time=c(1,2,3), status = c(0,0,1), x = c(2,2,1)) df_sgb <- as_sgb_data(df, status = status, time = time) tbl_sgb <- as_tibble(df_sgb) tbl_sgb#> # A tibble: 3 x 3 #> time status x #> <dbl> <dbl> <dbl> #> 1 1 0 2 #> 2 2 0 2 #> 3 3 1 1