Skip to content

Instantly share code, notes, and snippets.

Paul Rougieux paulrougieux

Block or report user

Report or block paulrougieux

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View spectrophotometer.txt
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
paulrougieux / pythonvariables.Rmd
Created Jun 27, 2018
Variable do not persist in note book mode, but they persist when markdown is compiled
View pythonvariables.Rmd
title: "R Notebook"
df_print: paged
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
paulrougieux / warningerrorlog.R
Last active Jul 12, 2017 — forked from anonymous/warningerrorlog.R
Catch errors and warnings from log file
View warningerrorlog.R
# 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
paulrougieux / scraplinks.R
Created Jul 7, 2017
Extract link texts and urls from a web page into an R data frame
View scraplinks.R
View testpagenumbers.lyx
#LyX 2.1 created this file. For more info see
\lyxformat 474
\textclass scrbook
\use_default_options true
\maintain_unincluded_children false
paulrougieux / dplyrfilternse.R
Last active Apr 15, 2016
dplyr::filter nse
View dplyrfilternse.R
Species <- "virginica"
# The Species variable is interpreted
# in the context of the data frame
iris %>%
filter_(Species == Species) %>%
# 150
paulrougieux / threeparttable.lyx
Last active Dec 12, 2016
Use of the package threeparttable with Lyx
View threeparttable.lyx
#LyX 2.1 created this file. For more info see
\lyxformat 474
\textclass article
\use_default_options true
paulrougieux / knitrchunk
Last active Nov 19, 2015
Add a footnote in a table generated by xtable inside a Lyx document (answer from
View knitrchunk
<<1stgenerationxtunitroot, results='asis'>>=
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
sanitize.text.function=function(str)gsub("footnote","\\footnote{my tricky footnote !!}",str,fixed=TRUE))
paulrougieux / hyphen.lyx
Last active Nov 5, 2015
Hyphens are not printed when printing from the evince PDF viewer on Debian
View hyphen.lyx
#LyX 2.1 created this file. For more info see
\lyxformat 474
\textclass article
\use_default_options true
\maintain_unincluded_children false
paulrougieux / countwordpersentence.R
Last active Oct 30, 2015
Count the number of words per sentence
View countwordpersentence.R
#' Separate the input text in sentences and count the number of words per sentence
#' @param blabla character vector containing a single text string.
#' @param minwordpersentence number minimum of word that a sentence should
#' have so that it is taken into account
#' @return a list countaining the number of sentence, wordcount,
#' mean number of words per sentence and total word count.
#' @export
countwordpersentence <- function(blabla, minwordpersentence = 2){
blabla <- strsplit(blabla,"\\.")[[1]]
You can’t perform that action at this time.