Questions tagged [rlang]

rlang is an R package for creating tidy evaluation interfaces and manipulating language and environment objects. It is a utility package underlying many of the tidyverse family of packages.

rlang is an R package for creating tidy evaluation interfaces and manipulating language and environment objects. It is a utility package underlying many of the tidyverse family of packages.

rlang offers tools for building an alternate non-standard evaluation (NSE) interface, redubbed "tidy eval", based on quasiquotation. Its basic operators are quo() for quoting and !! (said "bang-bang") for unquoting. The tidy eval framework is now integrated in many tidyverse packages, including dplyr and tidyr.

786 questions
0
votes
1 answer

Automatically calling dev.off after plot in R

I'm looking for a way to automatically call dev.off() to flush a plot to disk when someone calls plot() or ggplot(). Is this possible? RStudio looks to automatically load the plot, how does that work?
Ben Hall
  • 1,927
  • 5
  • 25
  • 39
0
votes
3 answers

Forwarding expressions in dots after manipulation while capturing environment

I have a function fun_1 that utilizes substitute() on its ... argument, and another function fun_2 with signature fun_2(...) that implements the pattern do.call(fun_1, dots). I want fun_1() inside fun_2() to see the ... passed to fun_2(). Here's an…
kevinykuo
  • 4,600
  • 5
  • 23
  • 31
-1
votes
1 answer

Programming with mutate to create new data column

There is a data.frame like so: df <- data.frame("Config" = c("C1","C1","C2","C2"), "SN1" = 1:4, "SN2" = 5:8) I'm trying to make df %<>% mutate more generic. Here is an example: df %<>% mutate( Tag=paste( Config, …
Dimon
  • 436
  • 5
  • 15
-1
votes
1 answer

R lang table rows to columns spread

I am looking for a way to spread N rows into columns with R. Example input -> output given a table, I want to spread that years rows into columns id | year | val_1 | val_2 | val_3 ---|------|-------|-------|------ 1 | 2001 | 10 | 11 | 12 2 |…
Kyle
  • 19
  • 4
-2
votes
1 answer

Using NSE enquo with dply and tidyr (issue with complete(nesting(...), ...)

I'm trying to use the NSE with dplyr and tidyr. I have a list of product, their volume per month per region. The products and regions have hierarchical structure (ProductLevel1 coarser than ProductLevel2 coarser than Product Level3 ...). Before…
Fabien N.
  • 35
  • 5
1 2 3
52
53