Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save certifiedwaif/efab1f1444ee453f1bf9c7ad41186851 to your computer and use it in GitHub Desktop.
Save certifiedwaif/efab1f1444ee453f1bf9c7ad41186851 to your computer and use it in GitHub Desktop.
Working with list columns
parameters_tbl <- parameters_tbl %>%
mutate(sampler_mGamma=map(sampler_result, "mGamma"),
sampler_vip=map(sampler_mGamma, ~apply(.x, 2, mean)),
blma_vip=map(blma_result, "vinclusion_prob"),
error=map2_dbl(sampler_vip, blma_vip, ~sum((.x - .y)^2)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment