mat_tidy_do: Tidy on a df of regs with col reg_out

Description Usage Arguments Examples

Description

Tidy on a df of regs with col reg_out

Usage

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

Arguments

df

data

reg_col

name of column with regs?

...

futher arguments passed to tidy

Examples

1
2
3
4
5
6
7
8
9
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 Aug. 10, 2021, 11:01 a.m.