start new:
tmux
start new with session name:
tmux new -s myname
--- | |
title: "Visualizing the Clinton Email Network in R" | |
author: "hrbrmstr" | |
date: "`r Sys.Date()`" | |
output: html_document | |
--- | |
```{r include=FALSE} | |
knitr::opts_chunk$set( | |
collapse=TRUE, | |
comment="#>", |
# Tutorial and data based on the network visualization workshop published over https://rpubs.com/kateto/netviz | |
#packages: | |
library(igraph) | |
library(RCurl) | |
# get the data | |
nodes <- read.csv("https://raw.githubusercontent.com/danielmarcelino/Datasets/master/Media-NODES.csv", header=T, as.is=T) | |
ties <- read.csv("https://raw.githubusercontent.com/danielmarcelino/Datasets/master/Media-EDGES.csv", header=T, as.is=T) | |
# Explore data: |
require(MASS) | |
require(ggplot2) | |
require(scales) | |
require(gridExtra) | |
pca <- prcomp(iris[,-5], | |
center = TRUE, | |
scale. = TRUE) | |
prop.pca = pca$sdev^2/sum(pca$sdev^2) |
#!/bin/sh | |
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the | |
# CREATE block and create them in separate commands _after_ all the INSERTs. | |
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk. | |
# The mysqldump file is traversed only once. | |
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite | |
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite |