Skip to content

Instantly share code, notes, and snippets.

View mmaechler's full-sized avatar

Martin Mächler mmaechler

View GitHub Profile
mmaechler / ifelse-checks.R
Last active November 28, 2016 18:07
`ifelse2()` - experiments for a new version of `ifelse()`
##' warnifnot(): a "only-warning" version of stopifnot():
##' {Yes, learn how to use, ...) in a powerful manner !!}
warnifnot <- stopifnot
body(warnifnot) <-, list(body(stopifnot),
list(stop = quote(warning))))
## (now, this was really cute ....)
mmaechler / get-data.R
Created July 8, 2016 19:19 — forked from daroczig/get-data.R
Number of R packages submitted to CRAN
## original idea & report by Henrik Bengtsson at
## This script downloads the list of currently published R packages
## from CRAN and also looks at all the archived package versions to
## combine these into a list of all R packages ever published on
## CRAN with the date of first release.
## CRAN mirror to use
CRAN_page <- function(...) {
mmaechler / first.Rmd
Last active August 29, 2015 13:56
First R Markdown example -- and demo about non-accurate decimal numbers
R Markdown: "Why 10 * 0.1 is rarely 1.0"
This is an R Markdown document. Markdown is a simple formatting syntax for authoring web pages (in Rstudio click the **MD** toolbar button for help on Markdown).
When you click the **Knit HTML** button a web page will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this: