Mais conteúdo relacionado
Semelhante a バイオインフォ分野におけるtidyなデータ解析の最新動向 (20)
バイオインフォ分野におけるtidyなデータ解析の最新動向
- 6. for
tmp1 <- f(input)
tmp2 <- g(tmp1)
output <- h(tmp2)
for(i in 1:I){
# 1 tmp1
}
for(j in 1:J){
# 2 tmp2
}
for(k in 1:K){
# 3 output
}
output <- h(g(f(input)))
- 8. output <- apply(input, 1, function(x){
# 1
apply(x, 1, function(y){
# 2
apply(y, 1, function(z){
# 3
})
})
})
tmp1 <- apply(input, 1, function(x, y){
# 1
}, y=input2)
- 9. input %>% f() %>% g() %>% h() -> output
tidyverse
data.frame tibble
- 10. input %>% ... %>% summary()
input %>% ... %>% ggplot()
input %>% ... %>% plot_ly()
input %>% ... %>% save()
input %>% ... -> tmp_object
for apply
filter mutate
- 25. > iris %>%
select(Petal.Width, Species) %>%
filter(Species != "virginica") %>%
group_by(Species) %>%
mutate(mean=mean(Petal.Width))
ungroup %>%
map(., unique)
ungroup
map
- 32. fit <- lm(y ~ x, data)
data %>% ... %>% lm(y ~ x, .)