I hereby claim:
- I am gkampolis on github.
- I am gkampolis (https://keybase.io/gkampolis) on keybase.
- I have a public key ASBzQhmGGLDz-svR7xqUqoe0Rk6-F6zTKVoQ3yBV8qzZMgo
To claim this, I am signing this object:
### Keybase proof | |
I hereby claim: | |
* I am gkampolis on github. | |
* I am gkampolis (https://keybase.io/gkampolis) on keybase. | |
* I have a public key whose fingerprint is EE9C 33D0 CF4F 2433 7665 9DBA F56C E594 CA4E 655C | |
To claim this, I am signing this object: |
I hereby claim:
To claim this, I am signing this object:
#' When plotting multiple data series that share a common x axis but different y axes, | |
#' we can just plot each graph separately. This suffers from the drawback that the shared axis will typically | |
#' not align across graphs due to different plot margins. | |
#' One easy solution is to reshape2::melt() the data and use ggplot2's facet_grid() mapping. However, there is | |
#' no way to label individual y axes. | |
#' facet_grid() and facet_wrap() were designed to plot small multiples, where both x- and y-axis ranges are | |
#' shared acros all plots in the facetting. While the facet_ calls allow us to use different scales with | |
#' the \code{scales = "free"} argument, they should not be used this way. | |
#' A more robust approach is to the grid package grid.draw(), rbind() and ggplotGrob() to create a grid of | |
#' individual plots where the plot axes are properly aligned within the grid. |
library(gapminder) | |
library(tidyverse) | |
##====================================================================== | |
## Returns the first 5 countries with the worst drop in life expectancy. | |
##====================================================================== | |
gapminder %>% | |
select(country, year, continent, lifeExp) %>% | |
group_by(continent, country) %>% |
library(gapminder) | |
library(tidyverse) | |
gapminder %<>% # note the reassignment... | |
select(country, year, continent, lifeExp) %>% | |
group_by(continent, country) %>% | |
mutate(le_delta = lifeExp - lag(lifeExp)) %>% | |
summarize(worst_le_delta = min(le_delta, na.rm = TRUE)) %>% | |
arrange(worst_le_delta) %>% | |
head(5) |
; Autohotkey Capslock Remapping Script | |
; Danik | |
; More info at http://danikgames.com/blog/?p=714 | |
; danikgames.com | |
; | |
; Functionality: | |
; - Deactivates capslock for normal (accidental) use. | |
; - Hold Capslock and drag anywhere in a window to move it (not just the title bar). | |
; - Access the following functions when pressing Capslock: | |
; Cursor keys - J, K, L, I |