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 / 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 / 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 / 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 / themes.R
Last active September 6, 2018 05:00
ggplot_themes
### My favourite ggplot2 themes, always accessible ###
## just source this gist from any project ##
#####################################################################################
# Noam's default ggplot2 styling #####
# Source: https://github.com/noamross/noamtools/blob/master/R/theme_nr.R
theme_nr <-theme(text=element_text(family="Helvetica", size=14),
panel.grid.major.x=element_blank(),
@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 / rootdir.R
Created March 11, 2016 17:16
Get root directory of a Rstudio project
library(rprojroot)
root <- find_rstudio_root_file()
@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 / 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 / tables.Rmd
Created September 30, 2015 14:11 — forked from benmarwick/tables.Rmd
Methods for tables with rmarkdown
---
title: "A few methods for making tables in rmarkdown"
output: html_document
---
Updates:
Packages that have appeared since my original look into this, and seem great:
https://github.com/yihui/printr