Skip to content

Instantly share code, notes, and snippets.

View mccurcio's full-sized avatar
🏠
Working from home

MattCurcio mccurcio

🏠
Working from home
  • MA, USA
  • 02:14 (UTC -04:00)
View GitHub Profile
@mccurcio
mccurcio / ipak.R
Created September 30, 2016 22:54 — forked from stevenworthington/ipak.R
Install and load multiple R packages at once
# ipak function: install and load multiple R packages.
# check to see if packages are installed. Install them if they are not, then load them into the R session.
ipak <- function(pkg){
new.pkg <- pkg[!(pkg %in% installed.packages()[, "Package"])]
if (length(new.pkg))
install.packages(new.pkg, dependencies = TRUE)
sapply(pkg, require, character.only = TRUE)
}
@mccurcio
mccurcio / Multi-Var Graph in R
Created November 25, 2019 20:53
Multi-Variate Graph in R
library(RColorBrewer)
names <- c("V2", "V3", "V4", "V5", "V6")
mylist <- list(wine$V2, wine$V3, wine$V4, wine$V5, wine$V6)
makeProfilePlot(mylist, names)
@mccurcio
mccurcio / Initialize libraries in R
Created November 30, 2019 17:34
Initialize many libraries at one time using a list in R
## Initialize libraries
Libraries = c("knitr", "ggfortify")
for(p in Libraries){
library(p, character.only = TRUE)
}
### Keybase proof
I hereby claim:
* I am mccurcio on github.
* I am wisebabies (https://keybase.io/wisebabies) on keybase.
* I have a public key ASDN6XnVn4FrXkZor5NJJTwLettJhFVTCQAHHNHUWljtpgo
To claim this, I am signing this object:
@mccurcio
mccurcio / install_load_R_libraries.r
Last active September 4, 2020 19:55
install or load libraries in R
## install or load libraries in R
Libraries <- c("knitr", "ggfortify")
for (p in Libraries) {
#if (!require(p, character.only = TRUE) { install.packages(p) }
library(p, character.only = TRUE)
}
Libraries <- c('knitr', 'ggfortify')
for (p in Libraries) {
library(p, character.only = TRUE)
---
title: "Codebook template"
author: "Your name here"
date: "The date here"
output:
html_document:
keep_md: yes
---
## Project Description
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>...</title>
<meta name="description" content="...">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta name="author" content="bartek.bobko@gmail.com">
<link rel="shortcut icon" href="favicon.ico">
</head>
@mccurcio
mccurcio / Change Ipython Cell Width.ipynb
Last active August 18, 2021 17:18
Change Ipython Cell Width.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mccurcio
mccurcio / Kaggle_Python_Course_Final_Exercise.ipynb
Created August 21, 2021 01:34
Kaggle_Python_Course_Final_Exercise
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mccurcio
mccurcio / List comprehension.ipynb
Last active December 19, 2021 18:06
List comprehension
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.