inst/examples/ex_from_df.R

## Read data files ----
to_read <- list.files(
   system.file("examples/HPO-subset", package="ReDaMoR"),
   full.names=TRUE
)
hpo_tables <- list()
for(f in to_read){
   hpo_tables[[sub("[.]txt$", "", basename(f))]] <- readr::read_tsv(f)
}
## Build the model from a list of data frames ----
new_model <- df_to_model(
   list=names(hpo_tables), envir=as.environment(hpo_tables)
)
## Guess constraints and auto layout ----
new_model <- guess_constraints(new_model, data = hpo_tables) %>%
   auto_layout(lengthMultiplier=250)

## Plot the model ----
new_model %>%
   plot()

Try the ReDaMoR package in your browser

Any scripts or data that you put into this service are public.

ReDaMoR documentation built on April 4, 2025, 2:39 a.m.