hilaryparker / explainr Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
You give an example, bit don't show what the output is. If you had a readme.Rmd, and then knit to readme.md, you could show what the output looks like, which might motivate more people to try it out when they see what it actually does.
I did
devtools::install(pkg="./explainr-master")
where the explainr-master folder was extracted from the github zip file download. It installed 11 packages (assertthat, broom, DBI, dplyr, lazyeval, mnormt, plyr, psych, reshape2, tidyr, yaml). But running
ptest <- prop.test(x = 500, n = 1008)
library(explainr)
explain(ptest)
yields an error
Error in loadNamespace(name) : there is no package called ‘knitr’
Manually installing knitr -- install.packages("knitr") -- fixes this, but I thought you might like to know.
prop.test(c(11), c(12)) %>% explain()
...
The observed sample proportion is 0.916666666666667 (NA events out of a total sample size of NA).
...
missing import: evaluate
explain(ptest)
Quitting from lines 3-8 ()
Error in loadNamespace(name) : there is no package called 'evaluate'
I get errors when I try to knit the following RMarkdown snippet:
library(explainr)
lm(dist ~ speed, data = cars) %>% explain(theme = "visual")
Specifically, it complains that it can't find %>%
. Even if I add a line with library(dplyr)
, it still complains that I don't have tidy
(from the broom package).
I think that what's going on is that code in the inst
folder isn't receiving information from imports
in the DESCRIPTION
. One solution is to just add library(broom)
to the script for explain.lm
, but there might be better options.
I tried adding a check for it in the code, but I don't think I understand the big picture well enough to capture the error effectively.
> prop.test(c(11, 10, 4), c(12, 12, 12)) %>% explain()
Quitting from lines 124-128 ()
## Error in if (x$p.value < 1 - attr(x$conf.int, "conf")) {: argument is of length zero
## Warning: NAs introduced by coercion
## Error in if (x$p.value < 1 - attr(x$conf.int, "conf")) "reject" else "do not reject": argument is of length zero
Warning message:
In prop.test(c(11, 10, 4), c(12, 12, 12)) :
Chi-squared approximation may be incorrect
I just tried to run the example
devtools::install_github("hilaryparker/explainr")
library(explainr)
ptest <- prop.test(x = 500, n = 1008)
explain(ptest)
and got the following message
no applicable method for 'explain' applied to an object of class "htest"
Am I missing something here or did maybe the class of objects from prop.test()
change recently?
Hi,
Great package. Just tried the ptest() example and I got the following error:
Error in loadNamespace(name) : there is no package called ‘knitr’
Of course, installing "knitr" fixed this, but I figured it would be best to add it to the package dependencies that are loaded when you install explainr().
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.