Created
September 19, 2017 12:26
-
-
Save juba/cfe14111ed7bf688578d0620b2193e73 to your computer and use it in GitHub Desktop.
Tris à plat Rmarkdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "test" | |
date: "19 septembre 2017" | |
--- | |
```{r setup, include=FALSE} | |
knitr::opts_chunk$set(echo = TRUE) | |
library(knitr) | |
library(questionr) | |
d <- data.frame(question1 = c("a","a","b"), question2 = c("d","d","e")) | |
``` | |
# Tris à plat | |
```{r, results='asis'} | |
for (var in names(d)) { | |
cat('## ', var, '\n') | |
cat(kable(freq(d[,var]), format='markdown'), sep = '\n') | |
cat('\n') | |
} | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment