Skip to content

Instantly share code, notes, and snippets.

View cderv's full-sized avatar

Christophe Dervieux cderv

View GitHub Profile
@cderv
cderv / ignored_qa.txt
Last active October 22, 2020 17:06
ignored QA questions
https://stackoverflow.com/questions/10646665/how-to-convert-r-markdown-to-html-i-e-what-does-knit-html-do-in-rstudio-0-9
https://stackoverflow.com/questions/22081991/rmarkdown-pandoc-pdflatex-not-found
https://stackoverflow.com/questions/16172345/how-can-i-use-emacs-ess-mode-with-r-markdown
https://stackoverflow.com/questions/37241578/knitr-getting-a-parse-all-error-in-r-when-converting-rmd-file-into-html
https://stackoverflow.com/questions/33913780/internal-links-in-rmarkdown-dont-work
https://stackoverflow.com/questions/31214524/how-do-i-produce-r-package-vignettes-in-multiple-formats
https://stackoverflow.com/questions/25382459/rmarkdown-error-in-yaml
https://stackoverflow.com/questions/45228938/beamer-rmarkdown-changing-slide-count-for-backup-slides
https://stackoverflow.com/questions/25599860/how-to-increase-stack-space-overflow-for-pandoc-in-r
https://stackoverflow.com/questions/27246746/how-to-replicate-knit-html-in-a-command-line
@cderv
cderv / get_prev.R
Last active October 22, 2020 17:06
données bison futé
res <- jsonlite::fromJSON("http://www.bison-fute.gouv.fr/previsions/previsions.json")
library(tidyverse)
prev_bf <- tibble(
days = res$days,
depts = list(res$deptsLine[1:94]),
depart = map(res$values, ~ strsplit(.x[1:94], split = ",")) %>% modify_depth(2, 1) %>% simplify_all(),
retour = map(res$values, ~ strsplit(.x[1:94], split = ",")) %>% modify_depth(2, 2) %>% simplify_all()
) %>%
unnest()
prev_bf
@cderv
cderv / time.h
Created September 30, 2018 20:11
trying to debug anytime conversion
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#ifndef _TIME_H_
#define _TIME_H_
#include <crtdefs.h>
@cderv
cderv / demo_reprex.md
Created September 29, 2018 14:24
A demo of posting a reprex
@cderv
cderv / notes.md
Created May 13, 2018 14:46
Various notes on dev tools

Travis

  • Change for open source repo - see blog post

codecov

@cderv
cderv / map_flat_use_case.R
Created May 7, 2018 23:04
map_flat usage examples
#' ---
#' output:
#' md_document:
#' pandoc_args: [
#' '-f', 'markdown-implicit_figures',
#' '-t', 'commonmark',
#' --wrap=preserve
#' ]
#' ---
#'
@cderv
cderv / Notes.md
Last active February 9, 2018 19:53
Some stuff to remember on R

How to set RLIBS ?

R_LIBS='<somelibrarypath>:<someotherlibrarypath>'

How configure.args and configure.vars are resolved ?

They can be provided as a named list and this is resolved by install.packages using package name.

Can they be use with devtools.install.args ?

(CNN) -- Can a movie actually convince you to support torture? Can a movie really persuade you that "fracking" -- a process used to drill for natural gas -- is a danger to the environment? Can a movie truly cause you to view certain minority groups in a negative light?
Some scoff at the notion that movies do anything more than entertain. They are wrong. Sure, it's unlikely that one movie alone will change your views on issues of magnitude. But a movie (or TV show) can begin your "education" or "miseducation" on a topic. And for those already agreeing with the film's thesis, it can further entrench your views.
Anyone who doubts the potential influence that movies can have on public opinion need to look no further than two films that are causing an uproar even before they have opened nationwide. They present hot button issues that manage to fire up people from the left and right.
The first, "Zero Dark Thirty," is about the pursuit and killing of Osama bin Laden, which features scenes of torture. The second,
@cderv
cderv / About_Packrat.md
Last active November 8, 2017 09:26
How Packrat work

Fonction getPackageRecords

Parse description and call inferPackageRecord. Produce a table parsing the Description file

  1. Package desc field
  2. Version desc field
  3. Repo from getOption("repo")
  4. (optionnaly) GithubRepo desc field (Where does it come from ? devtools::install_github ?). if found, then return the table with dcf field