knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
library(tidyx) library(tidyverse) l1 <- list(a = "foo", b = "bar") l1 %>% mapx(~ paste(., .i, .n)) l1 %>% mapx(~ paste(., .i, .n), .t = "chr") l1 %>% mapx(paste,"X") l1 %>% mapx(function(x,.n) paste(x,.n),"[.n param]") l1 %>% mapx(function(x) paste(x, .n))
iris[c(1:2,51:52),] %>% mutatex(z = mean(Sepal.Length),.by = vars(Species)) iris[c(1:2,51:52),] %>% mutatex(z = mean(Sepal.Length),.by = "Species")
iris %>% head %>% mutate_ifx(funs(z = mean),.at = ~startsWith(.,"Pet")) iris %>% head %>% mutate_ifx(funs(z = mean),.at = vars(Petal.Length)) iris %>% head %>% mutate_ifx(funs(z = mean),.at = vars(Petal.Length), .keep = "new")
iris[c(1:2,51:52),] %>% summarizex(z = mean(Sepal.Length),.by = vars(Species)) iris[c(1:2,51:52),] %>% summarizex(z = mean(Sepal.Length),.by = "Species")
iris %>% slicex(1:2, .by= vars(Species))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.