Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/MilesMcBain/noprobs

Tidy error data
https://github.com/MilesMcBain/noprobs

Last synced: 9 days ago
JSON representation

Tidy error data

Awesome Lists containing this project

README

        

# noprobs

Errors, warnings, messages... it's all just data innit?

```r
library(titanic)
library(tidyverse)
library(noprobs)

fitting_fn <- function(a_df){

glm(Survived ~ ., family = binomial, data = a_df)

}

model_frame <-
titanic_train %>%
group_by(Pclass) %>%
nest() %>%
mutate(result = map(data, ~no_problem(fitting_fn(.x)))) %>%
unnest(result)

model_frame

## # A tibble: 3 x 6
## Pclass data .result .warnings .messages .errors
##
## 1 3
## 2 1
## 3 2

any_problems(model_frame)
## [1] TRUE

model_frame$.warnings
## [[1]]
## [1] "glm.fit: algorithm did not converge"

## [[2]]
## [1] "glm.fit: algorithm did not converge"

## [[3]]
## [1] "glm.fit: algorithm did not converge"
```