- TAB
- Cycle subtree folded -> children -> subtree
- S-TAB, C-u TAB
- Cycle buffer
- C-u C-u C-u TAB
- Expand all
- #+STARTUP: `overview`|`content`|`showall`
- Startup options
- C-c C-n
- Next heading
# Unix shell | |
# run if zero exit | |
cd tmp/a/b/c && tar xvf ~/archive.tar # untar if dir exists | |
# run if non-zero exit | |
cd tmp/a/b/c || mkdir -p tmp/a/b/c | |
cd tmp/a/b/c || mkdir -p tmp/a/b/c && tar xvf -C tmp/a/b/c ~/archive.tar | |
which | |
whereis |
with() | |
within() | |
round(x, n) # rounds x to n decimal places | |
ceiling(x) # vector x of smallest integers > x | |
floor(x) # vector x of largest interger < x | |
as.integer(x) # truncates real x to integers (compare to round(x, 0) | |
as.integer(x < cutpoint) # vector x of 0 if less than cutpoint, 1 if greater than cutpoint) |
# ggplot2 implements the idea of a "grammar of graphics". The grammar implemented | |
# by ggplot2 could be summarized as follows: | |
# | |
# plot: coord, scale, facet(?) + layers | |
# layer: data mapping stat geom position? | |
# | |
# A plot is defined by a coordinate system (coord), one or more scales (scale), an | |
# optional faceting specification (facet), and one or more layers (layer). A layer | |
# is defined as an R data frame (data), a specification mapping columns of that | |
# frame into aesthetic properties (mapping), a statistical approach to summarize |
Originally, I named this document "very bad things" because it does some stuff that proper folks should not do, like mixing bash and python and leaving filehandles unclosed. It's about a function I wrote to get sh*t done.
I've been doing bioinformatics for about 10 years now. I used to joke with a friend of mine that most of our work was converting between file formats. We don't joke about that anymore.