Skip to content

Instantly share code, notes, and snippets.

View jackbrookes's full-sized avatar
🌱

Dr Jack Brookes jackbrookes

🌱
View GitHub Profile
@jackbrookes
jackbrookes / S3Example.cs
Created August 6, 2018 22:38
A working version of the AWSSDK ./Examples/S3Example.cs (Modified AWSConfigs, changed POST request to PUT)
//
// Copyright 2014-2015 Amazon.com,
// Inc. or its affiliates. All Rights Reserved.
//
// Licensed under the AWS Mobile SDK For Unity
// Sample Application License Agreement (the "License").
// You may not use this file except in compliance with the
// License. A copy of the License is located
// in the "license" file accompanying this file. This file is
// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
library(tidyverse)
library(gridExtra)
plot_cars_var <- function(col_name){
ggplot(mtcars, aes_string(x = "mpg", y = col_name)) +
geom_smooth() +
geom_point()
}
mtcars %>%
@jackbrookes
jackbrookes / example_image_cowplot.R
Last active July 25, 2017 17:14
Example of how to combine plots with images side-by-side in cowplot for publication ready figures.
library(png)
library(grid)
library(tidyverse)
# generate random data
my.data <- data.frame(x = c(1:10), y = rnorm(10))
# plot random data
g <- ggplot(my.data, aes(x = x, y = y)) +
geom_point()