Skip to content

Instantly share code, notes, and snippets.

View Pakillo's full-sized avatar
🌳
Living the dream

Francisco Rodriguez-Sanchez Pakillo

🌳
Living the dream
View GitHub Profile
@Pakillo
Pakillo / docx2md.md
Created January 11, 2016 14:21 — forked from jesperronn/docx2md.md
Convert a Word Document into MD

Converting a Word Document to Markdown in One Move

The Problem

A lot of important government documents are created and saved in Microsoft Word (*.docx). But Microsoft Word is a proprietary format, and it's not really useful for presenting documents on the web. So, I wanted to find a way to convert a .docx file into markdown.

Installing Pandoc

On a mac you can use homebrew by running the command brew install pandoc.

The Solution

@Pakillo
Pakillo / Rpres_fontsize.Rpres
Created March 11, 2016 16:55
Controlling font size in Rpres
Example slide
==============
<font size = "5px">
```{r echo = FALSE}
cleandata <- read.csv(file.path(root, "inst/extdata/coordsdata.csv"))
studies <- count(cleandata, ref, species, variable)
kable(studies)
```
@Pakillo
Pakillo / rootdir.R
Created March 11, 2016 17:16
Get root directory of a Rstudio project
library(rprojroot)
root <- find_rstudio_root_file()
@Pakillo
Pakillo / Rprogramming-syllabus.md
Last active September 13, 2016 15:32 — forked from hadley/curriculum.md
R programming syllabus by Hadley Wickham

Notes:

  • I've tried to break up in to separate pieces, but it's not always possible: e.g. knowledge of data structures and subsetting are tidy intertwined.

  • Level of Bloom's taxonomy listed in square brackets, e.g. http://bit.ly/15gqPEx. Few categories currently assess components higher in the taxonomy.

Programming R curriculum

Data structures

@Pakillo
Pakillo / gist:d2ee89f78a5a85dc4b1593e7bf82afe9
Last active November 4, 2016 15:17
ploting prior and posterior Bayes
- https://mvuorre.github.io/r/ggplot2-visualizing-prior-posterior/
- https://users.soe.ucsc.edu/~draper/beta-distributions-r.txt
- http://shinyapps.org/apps/RGraphCompendium/index.php#prior-and-posterior
- https://alexanderetz.com/2015/07/25/understanding-bayes-updating-priors-via-the-likelihood/
- http://doingbayesiandataanalysis.blogspot.com.es/2015/10/posterior-predicted-distribution-for.html
- http://www.stat.cmu.edu/~hseltman/rube/rubeManual.pdf
- http://stackoverflow.com/questions/19476744/how-to-plot-bayesian-prior-and-posterior-distributions-in-one-panel-using-r
@Pakillo
Pakillo / beamer_two_col.Rmd
Created November 7, 2016 17:42 — forked from jhollist/beamer_two_col.Rmd
This .Rmd shows how to use two (or more) columns in a Beamer Presentation from RStudio
---
title: "Untitled"
author: "Jeff W. Hollister"
date: "2/2/2016"
output: beamer_presentation
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
@Pakillo
Pakillo / RFetchClimate.md
Created April 22, 2016 10:34
Fetch climate data in R with package RFc

New R package to fetch climate data from FetchClimate webservice

Francisco Rodriguez-Sanchez
22 April 2016

Trying new RFc package to get climate data into R from FetchClimate service.

See all the available climate variables here.

@Pakillo
Pakillo / ShinyPerspectivePlot.R
Created December 19, 2016 10:08 — forked from leeper/ShinyPerspectivePlot.R
Shiny App for 3D Interaction plots
library("shiny")
library("shinyjs")
ui <- shinyUI(pageWithSidebar(
titlePanel("", "3D Perspective Plot for Interaction Effects"),
sidebarPanel(
tabsetPanel(
tabPanel("Data",
@Pakillo
Pakillo / simulate.gamm.R
Created March 3, 2017 16:53 — forked from gavinsimpson/simulate.gamm.R
S3 method for simulate() for "gamm" objects from package mgcv
`simulate.gamm` <- function(object, nsim = 1, seed = NULL, newdata,
freq = FALSE, unconditional = FALSE, ...) {
if (!exists(".Random.seed", envir = .GlobalEnv, inherits = FALSE))
runif(1)
if (is.null(seed))
RNGstate <- get(".Random.seed", envir = .GlobalEnv)
else {
R.seed <- get(".Random.seed", envir = .GlobalEnv)
set.seed(seed)
RNGstate <- structure(seed, kind = as.list(RNGkind()))
@Pakillo
Pakillo / tryingRefManageR.md
Last active April 8, 2017 22:01
Quickly create and manage publication lists with RefManageR package
library(RefManageR)
BibOptions(check.entries=FALSE)

Read bibtex file with references:

refs <- ReadBib("C:\\Users\\FRS\\Desktop\\prueba.bib", check = "warn")