Skip to content

Instantly share code, notes, and snippets.

View VincentGuyader's full-sized avatar
:bowtie:

vincent guyader VincentGuyader

:bowtie:
  • ThinkR
  • FRANCE
View GitHub Profile
@VincentGuyader
VincentGuyader / gist:c2b97aee53a9d7d5cf15ffdcde7d0f65
Created February 24, 2018 15:29
My favorite Rmarkdown YAML header
---
title: "My analysis `r Sys.Date()`"
knit: (function(inputFile, encoding) { rmarkdown::render(inputFile, encoding = encoding, output_file = file.path(dirname(inputFile), glue::glue('myfile_{thinkr::clean_vec(date())}.html'))) })
output:
html_document:
toc: true
toc_float: true
code_folding: hide
---
@VincentGuyader
VincentGuyader / install-mini.R
Last active April 2, 2019 07:00
configuration poste R
percent <- function(x, digits = 2, format = "f", ...) {
paste0(formatC(100 * x, format = format, digits = digits, ...), "%")
}
mon_print <- function(synth){
N<-nrow(synth)
if( is.null(N)){
N<-1
synth <-
matrix(synth,nrow=1)