See https://github.com/yihui/knitr-examples/blob/master/018-fullfig-tikz.Rnw
SankeyR <- function(inputs, losses, unit, labels, format="plot"){ | |
######################## | |
# SankeyR version 1.01 (updated August 10, 2010) | |
# is a function for creating Sankey Diagrams in R. | |
# See http://www.sankey-diagrams.com for excellent examples of Sankey Diagrams. | |
# | |
# OPTIONS: | |
# 'inputs' is a vector of input values | |
# 'losses' is a vector of loss values | |
# 'unit' is a string of the unit |
import zipfile | |
def dump_database(connection, dump_file, sql_file): | |
"""Function to dump sqlite3 database into zipped file | |
see: http://bit.ly/IAUmKc | |
python 2.6+ only | |
connection: sqlite3 database connection |
My first examples with [***knitr***](http://yihui.name/knitr/) | |
----------------------------------------- | |
Let's include some simple R code: | |
```{r} | |
1+2 | |
``` | |
That worked. | |
Let's include a plot: | |
```{r fig.width=4, fig.height=4} |
========================================== ========================================== | |
TMUX COMMAND WINDOW (TAB) | |
========================================== ========================================== | |
List tmux ls List ^b w | |
New new -s <session> Create ^b c | |
Attach att -t <session> Rename ^b , <name> | |
Rename rename-session -t <old> <new> Last ^b l (lower-L) | |
Kill kill-session -t <session> Close ^b & |
I would start by installing the Sublime Package Control manager. This tool will allow you to install the other plugins without having to clone git repositories and copying them to the correct folders. Instead you will the command drop-down menu with "Ctrl + Shift + P" and then scrolling down until you see "Package Control: Install Package". A search bar will pop up and you can type the name of a package, click on the name and it will self install. If you have problems setting any of these up email me at barnes7td@gmail.com
-
Sublime Package Control - Install this first. This tool will allow you to easily install most (if not all) the other plugins in this list. (Ctrl + Shift + P, then select Package Control: Install Package)
-
SublimeERB - This plugin auto creates the erb tags. (<% %>, <%= %>, etc.) (Ctrl +
#see updated code base and some examples in the function "test" | |
# https://github.com/dgrapov/devium/blob/master/R/Devium%20PLS%20%20and%20OPLS.r | |
#Orthogonal Signal Correction for PLS models (OPLS) | |
#adapted from an example in the book <a href="http://www.springer.com/life+sciences/systems+biology+an+bioinfomatics/book/978-3-642-17840-5">"Chemometrics with R by Ron Wehrens"</a> | |
#this code requires the following packages: | |
need.packages<-c("pls", # to generate PLS models | |
"ggplot2" ) # to plot results |