gerkovink / dessert Goto Github PK
View Code? Open in Web Editor NEWYour favourite analysis recipe should always be followed by your favourite dessert
License: GNU Affero General Public License v3.0
Your favourite analysis recipe should always be followed by your favourite dessert
License: GNU Affero General Public License v3.0
The first issue we raise is the following. Assume that we have an incomplete data set data
that we would run through a standard test suite to benchmark the scope and state of the missingness and run our pre-imputation diagnostics and tests.
For example, something close to the following workflow example:
library(mice)
library(dplyr)
library(magrittr)
# missingness over columns
apply(data, 2, function(x) sum(is.na(x)))
# create missing data pattern plot
data %>%
md.pattern()
# Some text that discusses the use and interpretation of the pattern
# Some text that discusses the use and interpretation of the pattern
# Some text that discusses the use and interpretation of the pattern
# investigate bivariate data structure
data %>%
cor(use = "pairwise.complete.obs")
# investigate missingness relations
# Some text that discusses the use and interpretation of the relations
# Some text that discusses the use and interpretation of the relations
# Some text that discusses the use and interpretation of the relations
data %>%
dep.pattern()
# Some text that discusses the use and interpretation of the pattern
# Some text that discusses the use and interpretation of the pattern
# Some text that discusses the use and interpretation of the pattern
# create predictor matrix
data %>%
pred
# Some text that discusses the use and interpretation of the predictor matrix
# Some text that discusses the use and interpretation of the predictor matrix
# Some text that discusses the use and interpretation of the predictor matrix
Question 1 How can we realise that the above code is parsed through dessert(data)
such that the following components are generated:
Rmd
file that takes as input object data
html
file, with the option to generate additionally a .pdf
or .docx
file, cf. pandoc
data
as an .Rdata
fileREADME.md
file that holds information about the dessert
package, version and function used to generate the archive.# (1) function users call
dessert <- function (input, p1, p2, ...) {
# (2) initiate the dessert object
dessert <- Dessert$new(input, p1, ...)
# (7) apply render method
dessert$render(p2, ...)
return(dessert)
}
Dessert <- R6::R6Class(
name = "Dessert",
# (3) run initiate method
initialize = function(input, p, ...) {
# (4) call class function
do.call(dessert.class, ...)
},
# (8) run render method
render = function(p, ...) {
# (9) store input and markdown parameters in a rdata object
save(recipe.rdata)
quarto::quarto_render(self, ...)
}
)
# (5) say data.frame class was called
dessert.data.frame <- function(self, ...) {
# (6) now additional parameters given via an ellipsis
extra_parameters <- list(...)
return(self)
}
Alle specifieke recipe parameters bij stap 6, worden middels een ellipsis doorgegeven. Het is lastig om een validity check te doen op de parameters.
Nu is het mogelijk om parameters in de yml
van het qmd
te specificeren.
title: "Example Recipe"
param:
optional_parameter: 123,
required_parameter
Die worden bij het renderen als een lijst meegegeven:
quarto::quarto_render(self, params = list(optional_parameter = 456, required_parameter = FALSE))
Alleen het markdown bestand, wat wij meegeven aan de gebruiken door middel van: copy.file(markdown)
, heeft de ingestelde parameter waardes niet. Dus bij het heropenen van het qmd
bestand zal de gebruiker zelf die parameters weer moeten invullen.
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.