{{ message }}

Instantly share code, notes, and snippets.

# Paul Rougieux paulrougieux

Created May 29, 2020
Git config
View .vimrc
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
 """""""""""""""""""""""""" " Vundle package manager " """""""""""""""""""""""""" " Should be at the beginning set nocompatible " be iMproved, required filetype off " required " set the runtime path to include Vundle and initialize set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin()
Last active Jan 24, 2020 — forked from fbiga/License.md
Load data from faostat bulk download into R data frames

MIT

Copyright 2020 Paul Rougieux, 2019 fbiga

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE

Created Nov 20, 2018
View spectrophotometer.txt
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
 Group: Controls 1 Sample Wells Values MeanValue CV Od-bkgd-blank Anti-Hu Det A11 2.849 2.855 0.282 2.853 A23 2.860 Coat Control A12 0.161 0.160 0.530 0.159 A24 0.160 Diluent Standard 1 A9 0.114 0.113 1.379 0.104 A21 0.112 Diluent Standard 2 A8 0.012 0.013 2.817 0.012 A20 0.013
Created Jun 27, 2018
Variable do not persist in note book mode, but they persist when markdown is compiled
View pythonvariables.Rmd
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: "R Notebook" output: html_document: df_print: paged --- `{r setup, include=FALSE} knitr::opts_chunk\$set(echo = TRUE) library(reticulate)
Last active Jul 12, 2017 — forked from anonymous/warningerrorlog.R
Catch errors and warnings from log file
View warningerrorlog.R
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
 # Load the 2 functions below, # then test errors with: # downloadfile1(url="xxxx", destfile="/tmp/xxxx", logfile="~/rlog.txt") # ~/rlog.txt contains # Error in download.file(url = url, destfile = destfile, ...): cannot download all files # # then # # downloadfile2(url="xxxx", destfile="/tmp/xxxx", logfile="~/rlog.txt") # ~/rlog.txt contains the warning message
Last active Oct 3, 2021
Extract link texts and urls from a web page into an R data frame
Last active Jan 15, 2017
View testpagenumbers.lyx
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
 #LyX 2.1 created this file. For more info see http://www.lyx.org/ \lyxformat 474 \begin_document \begin_header \textclass scrbook \use_default_options true \begin_modules customHeadersFooters \end_modules \maintain_unincluded_children false
Last active Apr 15, 2016
dplyr::filter nse
View dplyrfilternse.R
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
 library(dplyr) library(lazyeval) Species <- "virginica" # The Species variable is interpreted # in the context of the data frame iris %>% filter_(Species == Species) %>% nrow() # 150
Last active Feb 23, 2022
Use of the package threeparttable with Lyx
View threeparttable.lyx
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
 #LyX 2.1 created this file. For more info see http://www.lyx.org/ \lyxformat 474 \begin_document \begin_header \textclass article \begin_preamble \usepackage[flushleft]{threeparttable} \end_preamble \use_default_options true \begin_modules
Last active Nov 19, 2015
Add a footnote in a table generated by xtable inside a Lyx document (answer from http://stackoverflow.com/a/13676007/2641825)
View knitrchunk
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
 <<1stgenerationxtunitroot, results='asis'>>= library(xtable) x <- matrix(rnorm(60), ncol = 10) x.big <- xtable(x,label='tabbig', caption='Example of longtable') names(x.big) <- LETTERS[1:10] names(x.big)[9] <- paste('I','footnote') # I put the tag on I letter print(x.big,tabular.environment='longtable',floating=FALSE, sanitize.text.function=function(str)gsub("footnote","\\footnote{my tricky footnote !!}",str,fixed=TRUE)) @