Result Data Frame Specifications
Examples
result_df_specs()
#> $v0_experimental
#> function(tt) {
#>
#> raw_cvals <- cell_values(tt)
#> ## if the table has one row and multiple columns, sometimes the cell values returns a list of the cell values
#> ## rather than a list of length 1 reprsenting the single row. This is bad but may not be changable
#> ## at this point.
#> if(nrow(tt) == 1 && length(raw_cvals) > 1)
#> raw_cvals <- list(raw_cvals)
#> cellvals <- as.data.frame(do.call(rbind, raw_cvals))
#> row.names(cellvals) <- NULL
#> rdf <- make_row_df(tt)
#> df <- cbind(rdf[rdf$node_class != "LabelRow",
#> c("name", "label", "abs_rownumber", "path", "reprint_inds", "node_class")],
#> cellvals)
#> maxlen <- max(lengths(df$path))
#> metadf <- do.call(rbind.data.frame, lapply(seq_len(NROW(df)),
#> function(ii) handle_rdf_row(df[ii, ], maxlen = maxlen)))
#> cbind(metadf[metadf$node_class != "LabelRow", ],
#> cellvals)
#> }
#> <environment: namespace:rtables>
#>