This function extracts a JSON object from a raw string containing extra text (such as descriptive headers or backticks) and converts it into a tidy data frame. Each row corresponds to a region, and columns correspond to the associated metrics.
parse_plausibility_json(raw_string)
A data frame where each row is a brain region (or IDP) and columns
are the metrics parsed from the JSON. Numeric values are converted to
numeric
. Regions with differing metric sets are filled with NA
.
if (FALSE) { # \dontrun{
df <- parse_plausibility_json(hellyes)
head(df)
} # }