fynn-oldenburg / GitHub-Projekt-Wissenschaftliches-Arbeiten

GitHub-Projektarbeit für Wissenschaftliches Arbeiten Wintersemester 2022/23
4 stars 1 forks source link

stats_metric doesn't work with tibble #9

Closed fynn-oldenburg closed 1 year ago

fynn-oldenburg commented 1 year ago

Example:

z <- tibble(rnorm(100, 25, 2))
class(z)

[1] "tbl_df"     "tbl"        "data.frame"

stats_metric(z)

Error in stats_metric(z) (analyzing_functions.R#41): x has to be a data.frame

Fix: Replacing if (any(class(x) != 'data.frame')) with if (!any(class(x) == 'data.frame'))