s_arrange: Modified version of dplyr's arrange that uses string...

Description Usage Arguments Examples

View source: R/s_dplyr.r

Description

Modified version of dplyr's arrange that uses string arguments

Usage

1
s_arrange(.data, ...)

Arguments

.data

the data frame (or similar object)

...

string version of arguments to original dplyr function

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
  library(dplyrExtras)
  
  d = mtcars
  cols = c("mpg","cyl","hp:vs")
  s_select(d,cols)
  # also works and yields identical result...
  cols = c("mpg","cyl, hp:vs")
  s_select(d,cols)
  
  s_filter(d,"gear == 3","cyl == 8")
  s_arrange(d, "-mpg, gear, carb")
  gd = s_group_by(d,"cyl")
  s_summarise(gd, "mean(disp), max(disp)")
  s_mutate_if(d, "cyl==6, new.col=100")
  

## End(Not run)

skranz/dplyrExtras documentation built on May 20, 2020, 6:39 p.m.