Menu Home

Better R Code with wrapr Dot Arrow

Our R package wrapr supplies a "piping operator" that we feel is a real improvement in R code piped-style coding. The idea is: with wrapr‘s "dot arrow" pipe "%.>%" the expression "A %.>% B" is treated very much like "{. <- A; B}". In particular this lets users think of […]

seplyr 0.5.8 Now Available on CRAN

We are pleased to announce that seplyr version 0.5.8 is now available on CRAN. seplyr is an R package that provides a thin wrapper around elements of the dplyr package and (now with version 0.5.8) the tidyr package. The intent is to give the part time R user the ability […]

R Tip: Be Wary of “…”

R Tip: be wary of “…“. The following code example contains an easy error in using the R function unique(). vec1 <- c("a", "b", "c") vec2 <- c("c", "d") unique(vec1, vec2) # [1] "a" "b" "c" Notice none of the novel values from vec2 are present in the result. Our […]

wrapr 1.5.0 available on CRAN

The R package wrapr 1.5.0 is now available on CRAN. wrapr includes a lot of tools for writing better R code: let() (let block) %.>% (dot arrow pipe) build_frame() / draw_frame() ( data.frame builders and formatters ) qc() (quoting concatenate) := (named map builder) %?% (coalesce) NEW! %.|% (reduce/expand args) […]

R Tip: Think in Terms of Values

R tip: first organize your tasks in terms of data, values, and desired transformation of values, not initially in terms of concrete functions or code. I know I write a lot about coding in R. But it is in the service of supporting statistics, analysis, predictive analytics, and data science. […]