library(tidyverse)
# See https://stackoverflow.com/a/17313561/120898
pts <- function(x) {
as.numeric(grid::convertUnit(grid::unit(x, "pt"), "mm"))
}
df <- tibble(x = 1:10, y = 1:10)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Notes | |
# ----- | |
# * Cooler's stored bin IDs are 0-based. However, for consistency with R, this API should take | |
# 1-based indexing as input for table row and matrix range queries. | |
# * See Ilya's implementation: https://github.com/dozmorovlab/HiCcompare/issues/9 | |
library(hdf5r) | |
library(dplyr) | |
library(tibble) | |
library(purrr) | |
library(data.table) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(furrr) | |
# localhost -> AWS EC2 linux -> Docker running on that -> R | |
# dm_create() and dm_ip() are from an unreleased R pkg I whipped up, dockermachinery | |
# https://github.com/DavisVaughan/dockermachinery | |
# Creates 1 t2.micro EC2 instance | |
dm_create("amazonec2", "dockertest") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
TODAY=`date +%Y-%m-%d` | |
TODAY_MD=`date +%B\ %d,\ %Y` | |
YEAR=`date +%Y` | |
PACKAGENAME=$1 | |
## | |
## CHANGE ME!!! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(ggplot2) | |
library(lubridate) | |
library(tidyr) | |
library(viridis) | |
#library(extrafont) # optional | |
library(lubridate) | |
library(gridExtra) | |
library(ggExtra) | |
library(dplyr) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(ggplot2) ## devtools::install_github("hadley/ggplot2) | |
library(grid) ## rasterGrob | |
library(EBImage) ## readImage (alternatively: magick::image_read) | |
library(ggthemes) ## theme_minimal | |
## ########## | |
## INDEPENDENT CODE TO BE SOURCED: | |
## ########## | |
# user-level interface to the element grob |
The dplyr
package in R makes data wrangling significantly easier.
The beauty of dplyr
is that, by design, the options available are limited.
Specifically, a set of key verbs form the core of the package.
Using these verbs you can solve a wide range of data problems effectively in a shorter timeframe.
Whilse transitioning to Python I have greatly missed the ease with which I can think through and solve problems using dplyr in R.
The purpose of this document is to demonstrate how to execute the key dplyr verbs when manipulating data using Python (with the pandas
package).
dplyr is organised around six key verbs:
People
:bowtie: |
😄 :smile: |
😆 :laughing: |
---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |
NewerOlder