mat_tidy_do: Tidy on a df of regs with col reg_out

mat_tidy_doR Documentation

Tidy on a df of regs with col reg_out

Description

Tidy on a df of regs with col reg_out

Usage

mat_tidy_do(df, reg_col = reg_out, ...)

Arguments

df

data

reg_col

name of column with regs?

...

futher arguments passed to tidy

Examples

library(purrr)
library(dplyr)
library(tidyr)

iris_regs <- nest(iris, data=-Species) %>%
  mutate(reg_out = map(data, ~lm(Petal.Width~Petal.Length, data=as_tibble(.)))) %>%
  select(-data)

mat_tidy_do(df=iris_regs)

MatthieuStigler/matPkg documentation built on Jan. 29, 2025, 8:58 a.m.