This file contains hidden or 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
plot(protein_peak_dend$dendrogram ) | |
z<-sapply(protein_peak_data, function(x) x@mass[x@mass > 4000 & x@mass < 15000]) | |
z <- z[ match(labels(protein_peak_dend$dendrogram),labels(z))] | |
plot(1, xlim=c(0,861), ylim=c(4000,15000)) | |
for(i in seq_along(z)) points(z[[i]], x=rep(i, length(z[[i]])), col = rgb(red = 0, green = 0, blue = 0, alpha = 0.1), pch=16, cex=.5) |
This file contains hidden or 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
server <- function(input, output, server) { | |
output$out <- renderText({ | |
validate( | |
need(input$x < 0, "x can not be negative"), | |
need(input$trans %in% c("log", "square-root"), "trans blah blah") | |
) | |
switch(input$trans, | |
square = input$x ^ 2, | |
"square-root" = sqrt(input$x), |
This file contains hidden or 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(data.table) | |
library(geofacet) | |
library(magrittr) | |
raw_data <- data.table::fread("http://covidtracking.com/api/states/daily.csv") | |
raw_data$date <- as.Date(as.character(raw_data$date), "%Y%m%d") | |
raw_data <- raw_data[date > "2020-03-15", ] |
This file contains hidden or 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(data.table) | |
library(geofacet) | |
raw_data <- data.table::fread("http://covidtracking.com/api/states/daily.csv") | |
raw_data$date <- as.Date(as.character(raw_data$date), "%Y%m%d") | |
raw_data <- raw_data[date > "2020-03-15", ] | |
raw_data[positiveIncrease > 0, ] %>% |
This file contains hidden or 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(data.table) | |
library(geofacet) | |
raw_data <- data.table::fread("http://covidtracking.com/api/states/daily.csv") | |
raw_data$date <- as.Date(as.character(raw_data$date), "%Y%m%d") | |
raw_data <- raw_data[date > "2020-03-15", ] |
This file contains hidden or 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(data.table) | |
library(reshape2) | |
library(ggplot2) | |
a <- "https://covidtracking.com/api/v1/states/IL/daily.csv" | |
a <- data.table::fread(a) | |
a$date <- as.Date(as.character(a$date), "%Y%m%d") |
This file contains hidden or 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
# install.packages("dendexted") | |
lca_height <- function(dend, | |
input_a, | |
input_b) { | |
subtrees <- dendextend::partition_leaves(dend) | |
find_ancestors <- function(input_labels) { | |
which(sapply(subtrees, function(x) input_labels %in% x)) |
This file contains hidden or 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
protein | average | |
---|---|---|
RL29 [M+2H]2+ | 3637.8 | |
RS32 [M+H]+ | 5096.8 | |
RS34 [M+H]+ | 5381.4 | |
RS33meth [M+H]+ | 6255.4 | |
RL29 [M+H]+ | 7274.5 | |
RS19 [M+H]+ | 10300.1 | |
RNAse A [M+H]+ | 13683.2 | |
Myoglobin [M+H]+ | 16952.3 |
This file contains hidden or 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
N=5 | |
for( i in 1:(N-1) ){ | |
for( j in (i+1):N ){ | |
print(paste(i,j)) | |
} | |
} |
This file contains hidden or 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(data.table) | |
library(geofacet) | |
library(grid) | |
library(gganimate) | |
# Accessed 2020-03-24 at 9pm CST | |
confirmed <- data.table::fread("http://covidtracking.com/api/states/daily.csv") | |
confirmed$date <- as.Date(as.character(confirmed$date), "%Y%m%d") | |
confirmed <- confirmed[confirmed$date != "2020-03-24", ] |