Giter Site home page Giter Site logo

nomnoml's Introduction

nomnoml

CRAN status CRAN RStudio mirror downloads R-CMD-check Codecov test coverage Lifecycle: experimental

nomnoml provides an R interface to nomnoml.js, a tool for drawing sassy UML diagrams based on syntax with customizable styling.

Installation

Install from CRAN:

install.packages("nomnoml")

Or from GitHub using:

install.packages("remotes")
remotes::install_github("rstudio/nomnoml")

You need a chromium based browser installed on your system

In previous releases of nomnoml (prior to v0.3.0) we used the phantom.js headless browser to capture screenshots. In version 0.3.0 we switched to using webshot2.

This means you need a chromium-based browser, e.g. Chromium itself, Chrome, Edge, Vivaldi, Brave, or Opera.

Getting Started

You can create your first diagram by running:

nomnoml::nomnoml("[Hello]-[World!]")

To make the diagram flow vertically, the default at nomnoml.com, add the direction directive:

#direction: down
[Hello]-[World!]

You can also use nomnoml in R Markdown:

---
title: "A Diagram"
output: html_document
---

```{r, setup, include=FALSE}
library(nomnoml)
```

```{nomnoml}
#stroke: orange
#.box: fill=#8f8 dashed visual=ellipse

[A]-[B]-[<box>C]
```

SVG

To render using SVG, add svg = TRUE

nomnoml(diagram, svg = TRUE)

To render a nomnoml chunk in R Markdown, add svg=TRUE to the chunk options

```{nomnoml, svg=TRUE}
#stroke: orange
#.box: fill=#8f8 dashed visual=ellipse

[A]-[B]-[<box>C]
```

Advanced

Notice that much more complex diagrams can be designed using nomnoml by combining association types, classifier types, directives and custom classifier styles.

#stroke: #a86128
#direction: down
[<frame>Decorator pattern|
  [<abstract>Component||+ operation()]
  [Client] depends --> [Component]
  [Decorator|- next: Component]
  [Decorator] decorates -- [ConcreteComponent]
  [Component] <:- [Decorator]
  [Component] <:- [ConcreteComponent]
]

Nomnoml documentation

Association types

-    association
->   association
<->  association
-->  dependency
<--> dependency
-:>  generalization
<:-  generalization
--:> implementation
<:-- implementation
+-   composition
+->  composition
o-   aggregation
o->  aggregation
-o)  ball and socket
o<-) ball and socket
->o  ball and socket
--   note
-/-  hidden
_>   weightless edge
__   weightless dashed edge

Classifier types

[name]
[<abstract> name]
[<instance> name]
[<reference> name]
[<note> name]
[<package> name]
[<frame> name]
[<database> name]
[<pipe> name]
[<start> name]
[<end> name]
[<state> name]
[<choice> name]
[<sync> name]
[<input> name]
[<lollipop> lollipop]
[<sender> name]
[<socket> socket]
[<receiver> name]
[<transceiver> name]
[<actor> name]
[<usecase> name]
[<label> name]
[<hidden> name]
[<table> name| a | 5 || b | 7]

Directives

#import: my-common-styles.nomnoml
#arrowSize: 1
#bendSize: 0.3
#direction: down | right
#gutter: 5
#edgeMargin: 0
#gravity: 1
#edges: hard | rounded
#background: transparent
#fill: #eee8d5; #fdf6e3
#fillArrows: false
#font: Calibri
#fontSize: 12
#leading: 1.25
#lineWidth: 3
#padding: 8
#spacing: 40
#stroke: #33322E
#title: filename
#zoom: 1
#acyclicer: greedy
#ranker: network-simplex | tight-tree | longest-path

Directives only available when using the command line interface

#import: my-common-styles.nomnoml

Custom classifier styles

A directive that starts with “.” define a classifier style.

#.box: fill=#88ff88
#.blob: fill=pink visual=ellipse italic bold dashed
[<box> GreenBox]
[<blob> HideousBlob]

Available key/value pairs:

fill=(any css color)

stroke=(any css color)

align=center
align=left

direction=right
direction=down

visual=actor
visual=class
visual=database
visual=ellipse
visual=end
visual=frame
visual=hidden
visual=input
visual=none
visual=note
visual=package
visual=receiver
visual=rhomb
visual=roundrect
visual=sender
visual=start
visual=table
visual=transceiver

Available modifiers are

center
bold
underline
italic
dashed
empty

nomnoml's People

Contributors

andrie avatar dmurdoch avatar javierluraschi avatar jdblischak avatar jimhester avatar robinlovelace avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

nomnoml's Issues

Discussion: RStudio viewer

Is it possible to directly open a diagram within the RStudio Viewer or is the default way using an external browser?
Thank you!

Misspelled package name

Hello,

nomnoml is misspelled as nomonoml in both this repo readme and the official CRAN readme.

See this line

Please fix. It may cause confusion when trying to install the package.

Validating nomnoml diagrams?

Currently there is no way to validate if a nomnoml diagram is valid, say [hello] (valid), vs [hello (invalid).

However, we can use the mlverse/duktape package as a workaround as follows:

remotes::install_github("mlverse/duktape")

Then define the following function:

nomnoml_validate <- function(diagram = "[test]") {
    duktape::eval(
        paste(c(
            readLines(system.file("htmlwidgets/lib/dagre/dagre.min.js", package = "nomnoml")),
            readLines(system.file("htmlwidgets/lib/lodash/lodash.js", package = "nomnoml")),
            readLines(system.file("htmlwidgets/lib/nomnoml/nomnoml.js", package = "nomnoml")),
            paste0("nomnoml.parse('", diagram, "')")
        ), collapse = "\n")
    )
}

And validate nomnoml syntax as follows:

nomnoml_validate("[hello]")

vs

nomnoml_validate("[hello")
 Error in duktape::rcpp_eval(paste(c(readLines(system.file("htmlwidgets/lib/dagre/dagre.min.js",  : 
  Error: Parse error on line 1:
[hello
------^
Expecting 'SEP', '|', ']', got 'EOF' 

Weightless associations causes error with "direction: right"

Weightless edges, e.g. _>, cause the diagram to appear empty. Here's a simple example

nomnoml::nomnoml('
[foo]->[bar]
[foo]_>[baz]
')

In R this renders as an empty page, whereas online it appears like this

foo-_bar___foo____baz

If I pop the diagram out into the browser, there are errors in the javascript console

Uncaught TypeError: can't access property "forEach", t.points is undefined
    undo http://localhost:25130/session/viewhtml17d6d3b7c4dc4/lib/graphre-0.1.3/graphre.js:2902
    undo http://localhost:25130/session/viewhtml17d6d3b7c4dc4/lib/graphre-0.1.3/graphre.js:2909
    layout http://localhost:25130/session/viewhtml17d6d3b7c4dc4/lib/graphre-0.1.3/graphre.js:3791
    B http://localhost:25130/session/viewhtml17d6d3b7c4dc4/lib/graphre-0.1.3/graphre.js:1038
    layout http://localhost:25130/session/viewhtml17d6d3b7c4dc4/lib/graphre-0.1.3/graphre.js:3790
    layout http://localhost:25130/session/viewhtml17d6d3b7c4dc4/lib/graphre-0.1.3/graphre.js:3929
    B http://localhost:25130/session/viewhtml17d6d3b7c4dc4/lib/graphre-0.1.3/graphre.js:1038
    layout http://localhost:25130/session/viewhtml17d6d3b7c4dc4/lib/graphre-0.1.3/graphre.js:3509
    B http://localhost:25130/session/viewhtml17d6d3b7c4dc4/lib/graphre-0.1.3/graphre.js:1038
    layout http://localhost:25130/session/viewhtml17d6d3b7c4dc4/lib/graphre-0.1.3/graphre.js:3429
    layoutCompartment http://localhost:25130/session/viewhtml17d6d3b7c4dc4/lib/nomnoml-1.4.0/nomnoml.js:994
    layout http://localhost:25130/session/viewhtml17d6d3b7c4dc4/lib/nomnoml-1.4.0/nomnoml.js:1099
    parseAndRender http://localhost:25130/session/viewhtml17d6d3b7c4dc4/lib/nomnoml-1.4.0/nomnoml.js:2992
    draw http://localhost:25130/session/viewhtml17d6d3b7c4dc4/lib/nomnoml-1.4.0/nomnoml.js:3007
    resizeCanvas http://localhost:25130/session/viewhtml17d6d3b7c4dc4/lib/nomnoml-binding-0.2.5/nomnoml.js:35
    renderValue http://localhost:25130/session/viewhtml17d6d3b7c4dc4/lib/nomnoml-binding-0.2.5/nomnoml.js:84
    renderValue http://localhost:25130/session/viewhtml17d6d3b7c4dc4/lib/htmlwidgets-1.5.4/htmlwidgets.js:886
    staticRender http://localhost:25130/session/viewhtml17d6d3b7c4dc4/lib/htmlwidgets-1.5.4/htmlwidgets.js:653
    forEach http://localhost:25130/session/viewhtml17d6d3b7c4dc4/lib/htmlwidgets-1.5.4/htmlwidgets.js:55
    staticRender http://localhost:25130/session/viewhtml17d6d3b7c4dc4/lib/htmlwidgets-1.5.4/htmlwidgets.js:576
    forEach http://localhost:25130/session/viewhtml17d6d3b7c4dc4/lib/htmlwidgets-1.5.4/htmlwidgets.js:55
    staticRender http://localhost:25130/session/viewhtml17d6d3b7c4dc4/lib/htmlwidgets-1.5.4/htmlwidgets.js:574
    maybeStaticRenderLater http://localhost:25130/session/viewhtml17d6d3b7c4dc4/lib/htmlwidgets-1.5.4/htmlwidgets.js:698
    <anonymous> http://localhost:25130/session/viewhtml17d6d3b7c4dc4/lib/htmlwidgets-1.5.4/htmlwidgets.js:705
graphre.js:2902:13

Insert saved values in a model

I built a model for my thesis with nomnoml and I am really satisfied with the looks. Now I want to add the specific path coefficients (see exapmle below). The thing is, that I want the model to adapt if the values for the path coefficients change. Therefore I don't want to type "0.27" into the nomnoml model but use the saved value "a1" instead. So when "a1" for example changes to "0.21" that I don't have to change the value in the model but it changes automatically. Is there a way to do this in nomnoml? Also is it possible to center the inserted value in the middle of the arrow line?
Thanks in advance

`


a1 <- 0.27
b1 <- 0.35
#stroke: black
#ranker: longest-path
#spacing: 40
#gravity: 2
#edges:hard
#arrowSize: 0.8
#lineWidth: 2
#padding: 12


[Social Comparison]<--[<reference>Age]
[FOMO]<--[<reference>Age]
[SNS Addiction]<--[<reference>Age]

[FOMO]<--[<reference>Gender]
[Social Comparison]<--[<reference>Gender]



[Subjective Well-Being]->[Social Comparison]
[Social Comparison]->[FOMO]
[FOMO]->[SNS Addiction]
[Subjective Well-Being]->[SNS Addiction]



`

no svg figure displayed in xaringan presentation

Great package, I love it.

However, when using the nomnoml knitr engine, the diagram will not be displayed as svg, when I use the option svg = TRUE
Example

---
title: "Example"
author: "For Instance"
date: '`r format(Sys.Date(), format = "%d. %B %Y")`'
output:
  xaringan::moon_reader:
    lib_dir: lib
    seal: true
    nature:
      ratio: "16:9"
---

```{nomnoml, svg=TRUE}
[Hello]-[World]
```

(I save this as index.Rmd)

When I run xaringan::inf_mr("index.Rmd"), I see the slide as expected, however, it's not an svg-file, which you can see when I try to save it by right-click → "Save Image As ...". It gets saved as "canvas.png". Why?
Bildschirmfoto_2021-10-18_20-45-37

Changing to svg=FALSE seems to have no effect.

Rmd support

I remember at some point being able to render {nomnoml} chunks in R markdown. Doesn't seem to be the case anymore?

Apologies in advance if I'm missing something obvious. Thank you for the great package!

R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

other attached packages:
[1] rmarkdown_2.6 nomnoml_0.2.3 reticulate_1.18 purrr_0.3.4 tibble_3.0.6
[6] readr_1.4.0 dplyr_1.0.4 ggplot2_3.3.3

```{nomnoml}
Error: attempt to use zero-length variable name
> #stroke: orange
> #.box: fill=#8f8 dashed visual=ellipse
> 
> [A]-[B]
Error: unexpected '[' in "["
> [B]-[<box>C]
Error: unexpected '[' in "["
> ```
Error: attempt to use zero-length variable name
> 

SVG output option

Thanks for porting nomnoml to R!
Are there any plans to have a SVG output option? For instance, the mermaid graphs from DiagrammeR package supports SVG outputs, which is quite handy.

DiagrammeR::mermaid("
graph LR
  A-->B
  A-->C
  C-->E
  B-->D
  C-->D
  D-->F
  E-->F
")

Strange Sizing Output

somewhat related to issue #2 , but I am getting a strange size issue in my rmd output viewer when I render the html. If I reopen the html file it looks fine. I am running the stable cran version:


title: "Untitled"
author: "Ellis Hughes"
date: "July 5, 2019"
output: html_document


nomnoml::nomnoml("
[Model]->[Action]
[Action]->[Game/Simulation]
[Game/Simulation]->[reward]
[Game/Simulation]->[state]
[reward]->[Model]
[state]->[Model]
")

sessionInfo()

image

session info:

sessionInfo()
## R version 3.5.1 (2018-07-02)
## Platform: x86_64-w64-mingw32/x64 (64-bit)
## Running under: Windows 10 x64 (build 17763)
## 
## Matrix products: default
## 
## locale:
## [1] LC_COLLATE=English_United States.1252 
## [2] LC_CTYPE=English_United States.1252   
## [3] LC_MONETARY=English_United States.1252
## [4] LC_NUMERIC=C                          
## [5] LC_TIME=English_United States.1252    
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## loaded via a namespace (and not attached):
##  [1] htmlwidgets_1.3 compiler_3.5.1  magrittr_1.5    tools_3.5.1    
##  [5] htmltools_0.3.6 yaml_2.2.0      Rcpp_1.0.0      nomnoml_0.1.0  
##  [9] stringi_1.2.4   rmarkdown_1.13  knitr_1.23      jsonlite_1.5   
## [13] stringr_1.3.1   xfun_0.8        digest_0.6.18   evaluate_0.14

Node sequence >2 do not render

Creating a sequence of nodes longer than 2 does not render at all in either the nomnoml chunk or on document render.

Taking the first line from nomnoml.com as an example; it renders on the webpage but only renders a blank page in RStudio:

[<start>start] -> [<state>plunder] -> [<choice>more loot] -> [start]

Perhaps this is intended behaviour as one of your basic examples breaks a simple sequence into two separate lines; [a]->[b]->[c]. I thought I'd mention it as I couldn't find it in the issue tracker and it might trip someone else up.

Thanks for all your work team.

[question] Sequence Diagrams?

Being the novice that I am to UML, how could I use nomnoml to illustrate a sequence diagram?

Or is this non existant functionality that may or may not be planned for?

nomnoml doesn't like big charts

Hi Javier,

Following the discussion on twitter :

nomnoml doesn't like big charts, and doesn't fail explicitly when we try. I don't know how much leverage you have on this as this does fail on nomnoml.com .

Here is a reproducible example, I am working on a package to print functions as flowcharts, and I run into issues with very long functions, the most infamous example is data.table:::`[.data.table` .that I'll use here.

Below is the full nomnoml string. If I split it in 2 I can et an output for each part, but the full thing won't display, the viewer stays white, and when printing to png it will fail silently (meaning the file is not written but functions doesn't error).

code <- "\n#.if: visual=rhomb fill=#e2efda align=center\n#.for: visual=rhomb fill=#ddebf7 align=center\n#.repeat: visual=rhomb fill=#fce4d6 align=center\n#.while: visual=rhomb fill=#fff2cc align=center\n#.none: visual=class fill=#ededed\n#.commented: visual=class fill=#ededed\n#.header: visual=ellipse fill=#d9e1f2 align=center\n#.return: visual=end fill=#70ad47  empty\n#.stop: visual=end fill=#ed7d31  empty\n#arrowSize: 1\n#bendSize: 0.3\n#direction: down\n#gutter: 5\n#edgeMargin: 0\n#edges: hard\n#fill: #eee8d5\n#fillArrows: false\n#font: Calibri\n#fontSize: 12\n#leading: 1.25\n#lineWidth: 3\n#padding: 16\n#spacing: 40\n#stroke: #33322E\n#title: filename\n#zoom: 1\n#acyclicer: greedy\n#ranker: network-simplex\n[<header> data.table:::`\\[.data.table`]  -> [<if> 1: ;if (!cedta())]\n[<if> 1: ;if (!cedta())] y -> [<none> 2: ;Nargs = nargs() - (!missing(drop));ans = if (Nargs < 3L) {;    `\\[.data.frame`(x, i);} else if (missing(drop)) `\\[.data.frame`(x, i, j) else `\\[.data.frame`(x, ;    i, j, drop)]\n[<none> 2: ;Nargs = nargs() - (!missing(drop));ans = if (Nargs < 3L) {;    `\\[.data.frame`(x, i);} else if (missing(drop)) `\\[.data.frame`(x, i, j) else `\\[.data.frame`(x, ;    i, j, drop)]  -> [<if> 3: ;if (!missing(i) & is.data.table(ans))]\n[<if> 3: ;if (!missing(i) & is.data.table(ans))] y -> [<none> 4: ;setkey(ans, NULL)]\n[<none> 4: ;setkey(ans, NULL)]  -> [<end> -3]\n[<if> 3: ;if (!missing(i) & is.data.table(ans))] n -> [<end> -3]\n[<end> -3]  -> [<none> 5: ;return(ans)]\n[<none> 5: ;return(ans)]  -> [<return> -5]\n[<if> 1: ;if (!cedta())] n -> [<end> -1]\n[<end> -1]  -> [<if> 6: ;if (!missing(verbose))]\n[<if> 6: ;if (!missing(verbose))] y -> [<none> 7: ;stopifnot(isTRUEorFALSE(verbose));oldverbose = options(datatable.verbose = verbose);on.exit(options(oldverbose))]\n[<none> 7: ;stopifnot(isTRUEorFALSE(verbose));oldverbose = options(datatable.verbose = verbose);on.exit(options(oldverbose))]  -> [<end> -6]\n[<if> 6: ;if (!missing(verbose))] n -> [<end> -6]\n[<end> -6]  -> [<none> 8: ;.global$print = \"\";missingby = missing(by) && missing(keyby)]\n[<none> 8: ;.global$print = \"\";missingby = missing(by) && missing(keyby)]  -> [<if> 9: ;if (!missing(keyby))]\n[<if> 9: ;if (!missing(keyby))] y -> [<if> 10: ;if (!missing(by))]\n[<if> 10: ;if (!missing(by))] y -> [<none> 11: ;stop(\"Provide either by= or keyby= but not both\")]\n[<none> 11: ;stop(\"Provide either by= or keyby= but not both\")]  -> [<stop> -11]\n[<if> 10: ;if (!missing(by))] n -> [<end> -10]\n[<end> -10]  -> [<if> 12: ;if (missing(j))]\n[<if> 12: ;if (missing(j))] y -> [<none> 13: ;warning(\"Ignoring keyby= because j= is not supplied\");keyby = NULL]\n[<none> 13: ;warning(\"Ignoring keyby= because j= is not supplied\");keyby = NULL]  -> [<end> -12]\n[<if> 12: ;if (missing(j))] n -> [<end> -12]\n[<end> -12]  -> [<none> 14: ;by = bysub = substitute(keyby);keyby = TRUE]\n[<none> 14: ;by = bysub = substitute(keyby);keyby = TRUE]  -> [<end> -9]\n[<if> 9: ;if (!missing(keyby))] n -> [<if> 15: ;if (!missing(by) && missing(j))]\n[<if> 15: ;if (!missing(by) && missing(j))] y -> [<none> 16: ;warning(\"Ignoring by= because j= is not supplied\");by = NULL]\n[<none> 16: ;warning(\"Ignoring by= because j= is not supplied\");by = NULL]  -> [<end> -15]\n[<if> 15: ;if (!missing(by) && missing(j))] n -> [<end> -15]\n[<end> -15]  -> [<none> 17: ;by = bysub = if (missing(by)) NULL else substitute(by);keyby = FALSE]\n[<none> 17: ;by = bysub = if (missing(by)) NULL else substitute(by);keyby = FALSE]  -> [<end> -9]\n[<end> -9]  -> [<none> 18: ;bynull = !missingby && is.null(by);byjoin = !is.null(by) && is.symbol(bysub) && bysub == \".EACHI\";naturaljoin = FALSE;names_x = names(x)]\n[<none> 18: ;bynull = !missingby && is.null(by);byjoin = !is.null(by) && is.symbol(bysub) && bysub == \".EACHI\";naturaljoin = FALSE;names_x = names(x)]  -> [<if> 19: ;if (missing(i) && !missing(on))]\n[<if> 19: ;if (missing(i) && !missing(on))] y -> [<none> 20: ;tt = eval.parent(.massagei(substitute(on)))]\n[<none> 20: ;tt = eval.parent(.massagei(substitute(on)))]  -> [<if> 21: ;if (!is.list(tt) \\|\\| !length(names(tt)))]\n[<if> 21: ;if (!is.list(tt) \\|\\| !length(names(tt)))] y -> [<none> 22: ;warning(\"When on= is provided but not i=, on= must be a named list or data.table\\|frame, and a natural join (i.e. join on common names) is invoked. Ignoring on= which is '\", ;    class(tt)\\[1L\\], \"'.\");on = NULL]\n[<none> 22: ;warning(\"When on= is provided but not i=, on= must be a named list or data.table\\|frame, and a natural join (i.e. join on common names) is invoked. Ignoring on= which is '\", ;    class(tt)\\[1L\\], \"'.\");on = NULL]  -> [<end> -21]\n[<if> 21: ;if (!is.list(tt) \\|\\| !length(names(tt)))] n -> [<none> 23: ;i = tt;naturaljoin = TRUE]\n[<none> 23: ;i = tt;naturaljoin = TRUE]  -> [<end> -21]\n[<end> -21]  -> [<end> -19]\n[<if> 19: ;if (missing(i) && !missing(on))] n -> [<end> -19]\n[<end> -19]  -> [<if> 24: ;if (missing(i) && missing(j))]\n[<if> 24: ;if (missing(i) && missing(j))] y -> [<none> 25: ;tt_isub = substitute(i);tt_jsub = substitute(j)]\n[<none> 25: ;tt_isub = substitute(i);tt_jsub = substitute(j)]  -> [<if> 26: ;if (!is.null(names(sys.call())) && tryCatch(!is.symbol(tt_isub), \n    error = function(e) TRUE) && tryCatch(!is.symbol(tt_jsub), \n    error = function(e) TRUE))]\n[<if> 26: ;if (!is.null(names(sys.call())) && tryCatch(!is.symbol(tt_isub), \n    error = function(e) TRUE) && tryCatch(!is.symbol(tt_jsub), \n    error = function(e) TRUE))] y -> [<none> 27: ;warning(\"i and j are both missing so ignoring the other arguments. This warning will be upgraded to error in future.\")]\n[<none> 27: ;warning(\"i and j are both missing so ignoring the other arguments. This warning will be upgraded to error in future.\")]  -> [<end> -26]\n[<if> 26: ;if (!is.null(names(sys.call())) && tryCatch(!is.symbol(tt_isub), \n    error = function(e) TRUE) && tryCatch(!is.symbol(tt_jsub), \n    error = function(e) TRUE))] n -> [<end> -26]\n[<end> -26]  -> [<none> 28: ;return(x)]\n[<none> 28: ;return(x)]  -> [<return> -28]\n[<if> 24: ;if (missing(i) && missing(j))] n -> [<end> -24]\n[<end> -24]  -> [<if> 29: ;if (!mult %chin% c(\"first\", \"last\", \"all\"))]\n[<if> 29: ;if (!mult %chin% c(\"first\", \"last\", \"all\"))] y -> [<none> 30: ;stop(\"mult argument can only be 'first','last' or 'all'\")]\n[<none> 30: ;stop(\"mult argument can only be 'first','last' or 'all'\")]  -> [<stop> -30]\n[<if> 29: ;if (!mult %chin% c(\"first\", \"last\", \"all\"))] n -> [<end> -29]\n[<end> -29]  -> [<none> 31: ;missingroll = missing(roll)]\n[<none> 31: ;missingroll = missing(roll)]  -> [<if> 32: ;if (length(roll) != 1L \\|\\| is.na(roll))]\n[<if> 32: ;if (length(roll) != 1L \\|\\| is.na(roll))] y -> [<none> 33: ;stop(\"roll must be a single TRUE, FALSE, positive/negative integer/double including +Inf and -Inf or 'nearest'\")]\n[<none> 33: ;stop(\"roll must be a single TRUE, FALSE, positive/negative integer/double including +Inf and -Inf or 'nearest'\")]  -> [<stop> -33]\n[<if> 32: ;if (length(roll) != 1L \\|\\| is.na(roll))] n -> [<end> -32]\n[<end> -32]  -> [<if> 34: ;if (is.character(roll))]\n[<if> 34: ;if (is.character(roll))] y -> [<if> 35: ;if (roll != \"nearest\")]\n[<if> 35: ;if (roll != \"nearest\")] y -> [<none> 36: ;stop(\"roll is '\", roll, \"' (type character). Only valid character value is 'nearest'.\")]\n[<none> 36: ;stop(\"roll is '\", roll, \"' (type character). Only valid character value is 'nearest'.\")]  -> [<stop> -36]\n[<if> 35: ;if (roll != \"nearest\")] n -> [<end> -35]\n[<end> -35]  -> [<end> -34]\n[<if> 34: ;if (is.character(roll))] n -> [<none> 37: ;roll = if (isTRUE(roll)) +Inf else as.double(roll)]\n[<none> 37: ;roll = if (isTRUE(roll)) +Inf else as.double(roll)]  -> [<end> -34]\n[<end> -34]  -> [<none> 38: ;force(rollends)]\n[<none> 38: ;force(rollends)]  -> [<if> 39: ;if (!is.logical(rollends))]\n[<if> 39: ;if (!is.logical(rollends))] y -> [<none> 40: ;stop(\"rollends must be a logical vector\")]\n[<none> 40: ;stop(\"rollends must be a logical vector\")]  -> [<stop> -40]\n[<if> 39: ;if (!is.logical(rollends))] n -> [<end> -39]\n[<end> -39]  -> [<if> 41: ;if (length(rollends) > 2L)]\n[<if> 41: ;if (length(rollends) > 2L)] y -> [<none> 42: ;stop(\"rollends must be length 1 or 2\")]\n[<none> 42: ;stop(\"rollends must be length 1 or 2\")]  -> [<stop> -42]\n[<if> 41: ;if (length(rollends) > 2L)] n -> [<end> -41]\n[<end> -41]  -> [<if> 43: ;if (length(rollends) == 1L)]\n[<if> 43: ;if (length(rollends) == 1L)] y -> [<none> 44: ;rollends = rep.int(rollends, 2L)]\n[<none> 44: ;rollends = rep.int(rollends, 2L)]  -> [<end> -43]\n[<if> 43: ;if (length(rollends) == 1L)] n -> [<end> -43]\n[<end> -43]  -> [<none> 45: ;.unsafe.opt();missingnomatch = missing(nomatch)]\n[<none> 45: ;.unsafe.opt();missingnomatch = missing(nomatch)]  -> [<if> 46: ;if (is.null(nomatch))]\n[<if> 46: ;if (is.null(nomatch))] y -> [<none> 47: ;nomatch = 0L]\n[<none> 47: ;nomatch = 0L]  -> [<end> -46]\n[<if> 46: ;if (is.null(nomatch))] n -> [<end> -46]\n[<end> -46]  -> [<if> 48: ;if (!is.na(nomatch) && nomatch != 0L)]\n[<if> 48: ;if (!is.na(nomatch) && nomatch != 0L)] y -> [<none> 49: ;stop(\"nomatch= must be either NA or NULL (or 0 for backwards compatibility which is the same as NULL)\")]\n[<none> 49: ;stop(\"nomatch= must be either NA or NULL (or 0 for backwards compatibility which is the same as NULL)\")]  -> [<stop> -49]\n[<if> 48: ;if (!is.na(nomatch) && nomatch != 0L)] n -> [<end> -48]\n[<end> -48]  -> [<none> 50: ;nomatch = as.integer(nomatch)]\n[<none> 50: ;nomatch = as.integer(nomatch)]  -> [<if> 51: ;if (!is.logical(which) \\|\\| length(which) > 1L)]\n[<if> 51: ;if (!is.logical(which) \\|\\| length(which) > 1L)] y -> [<none> 52: ;stop(\"which= must be a logical vector length 1. Either FALSE, TRUE or NA.\")]\n[<none> 52: ;stop(\"which= must be a logical vector length 1. Either FALSE, TRUE or NA.\")]  -> [<stop> -52]\n[<if> 51: ;if (!is.logical(which) \\|\\| length(which) > 1L)] n -> [<end> -51]\n[<end> -51]  -> [<if> 53: ;if ((isTRUE(which) \\|\\| is.na(which)) && !missing(j))]\n[<if> 53: ;if ((isTRUE(which) \\|\\| is.na(which)) && !missing(j))] y -> [<none> 54: ;stop(\"which==\", which, \" (meaning return row numbers) but j is also supplied. Either you need row numbers or the result of j, but only one type of result can be returned.\")]\n[<none> 54: ;stop(\"which==\", which, \" (meaning return row numbers) but j is also supplied. Either you need row numbers or the result of j, but only one type of result can be returned.\")]  -> [<stop> -54]\n[<if> 53: ;if ((isTRUE(which) \\|\\| is.na(which)) && !missing(j))] n -> [<end> -53]\n[<end> -53]  -> [<if> 55: ;if (!is.na(nomatch) && is.na(which))]\n[<if> 55: ;if (!is.na(nomatch) && is.na(which))] y -> [<none> 56: ;stop(\"which=NA with nomatch=0 would always return an empty vector. Please change or remove either which or nomatch.\")]\n[<none> 56: ;stop(\"which=NA with nomatch=0 would always return an empty vector. Please change or remove either which or nomatch.\")]  -> [<stop> -56]\n[<if> 55: ;if (!is.na(nomatch) && is.na(which))] n -> [<end> -55]\n[<end> -55]  -> [<if> 57: ;if (!with && missing(j))]\n[<if> 57: ;if (!with && missing(j))] y -> [<none> 58: ;stop(\"j must be provided when with=FALSE\")]\n[<none> 58: ;stop(\"j must be provided when with=FALSE\")]  -> [<stop> -58]\n[<if> 57: ;if (!with && missing(j))] n -> [<end> -57]\n[<end> -57]  -> [<none> 59: ;irows = NULL;notjoin = FALSE;rightcols = leftcols = integer();optimizedSubset = FALSE;..syms = NULL;av = NULL;jsub = NULL]\n[<none> 59: ;irows = NULL;notjoin = FALSE;rightcols = leftcols = integer();optimizedSubset = FALSE;..syms = NULL;av = NULL;jsub = NULL]  -> [<if> 60: ;if (!missing(j))]\n[<if> 60: ;if (!missing(j))] y -> [<none> 61: ;jsub = replace_dot_alias(substitute(j));root = if (is.call(jsub)) as.character(jsub\\[\\[1L\\]\\])\\[1L\\] else \"\"]\n[<none> 61: ;jsub = replace_dot_alias(substitute(j));root = if (is.call(jsub)) as.character(jsub\\[\\[1L\\]\\])\\[1L\\] else \"\"]  -> [<if> 62: ;if (root == \":\" \\|\\| (root %chin% c(\"-\", \"!\") && is.call(jsub\\[\\[2L\\]\\]) && \n    jsub\\[\\[2L\\]\\]\\[\\[1L\\]\\] == \"(\" && is.call(jsub\\[\\[2L\\]\\]\\[\\[2L\\]\\]) && \n    jsub\\[\\[2L\\]\\]\\[\\[2L\\]\\]\\[\\[1L\\]\\] == \":\") \\|\\| ((!length(av <- all.vars(jsub)) \\|\\| \n    all(substring(av, 1L, 2L) == \"..\")) && root %chin% c(\"\", \n    \"c\", \"paste\", \"paste0\", \"-\", \"!\") && missingby))]\n[<if> 62: ;if (root == \":\" \\|\\| (root %chin% c(\"-\", \"!\") && is.call(jsub\\[\\[2L\\]\\]) && \n    jsub\\[\\[2L\\]\\]\\[\\[1L\\]\\] == \"(\" && is.call(jsub\\[\\[2L\\]\\]\\[\\[2L\\]\\]) && \n    jsub\\[\\[2L\\]\\]\\[\\[2L\\]\\]\\[\\[1L\\]\\] == \":\") \\|\\| ((!length(av <- all.vars(jsub)) \\|\\| \n    all(substring(av, 1L, 2L) == \"..\")) && root %chin% c(\"\", \n    \"c\", \"paste\", \"paste0\", \"-\", \"!\") && missingby))] y -> [<none> 63: ;with = FALSE]\n[<none> 63: ;with = FALSE]  -> [<if> 64: ;if (length(av))]\n[<if> 64: ;if (length(av))] y -> [<for> 65: ;for (..name in av)]\n[<for> 65: ;for (..name in av)]  -> [<none> 66: ;name = substring(..name, 3L)]\n[<none> 66: ;name = substring(..name, 3L)]  -> [<if> 67: ;if (name == \"\")]\n[<if> 67: ;if (name == \"\")] y -> [<none> 68: ;stop(\"The symbol .. is invalid. The .. prefix must be followed by at least one character.\")]\n[<none> 68: ;stop(\"The symbol .. is invalid. The .. prefix must be followed by at least one character.\")]  -> [<stop> -68]\n[<if> 67: ;if (name == \"\")] n -> [<end> -67]\n[<end> -67]  -> [<if> 69: ;if (!exists(name, where = parent.frame()))]\n[<if> 69: ;if (!exists(name, where = parent.frame()))] y -> [<none> 70: ;stop(\"Variable '\", name, \"' is not found in calling scope. Looking in calling scope because you used the .. prefix.\", ;    if (exists(..name, where = parent.frame())) paste0(\" Variable '..\", ;        name, \"' does exist in calling scope though, so please just removed the .. prefix from that variable name in calling scope.\") else \"\")]\n[<none> 70: ;stop(\"Variable '\", name, \"' is not found in calling scope. Looking in calling scope because you used the .. prefix.\", ;    if (exists(..name, where = parent.frame())) paste0(\" Variable '..\", ;        name, \"' does exist in calling scope though, so please just removed the .. prefix from that variable name in calling scope.\") else \"\")]  -> [<stop> -70]\n[<if> 69: ;if (!exists(name, where = parent.frame()))] n -> [<if> 71: ;if (exists(..name, where = parent.frame()))]\n[<if> 71: ;if (exists(..name, where = parent.frame()))] y -> [<none> 72: ;warning(\"Both '\", name, \"' and '..\", name, \"' exist in calling scope. Please remove the '..\", ;    name, \"' variable in calling scope for clarity.\")]\n[<none> 72: ;warning(\"Both '\", name, \"' and '..\", name, \"' exist in calling scope. Please remove the '..\", ;    name, \"' variable in calling scope for clarity.\")]  -> [<end> -71]\n[<if> 71: ;if (exists(..name, where = parent.frame()))] n -> [<end> -71]\n[<end> -71]  -> [<end> -69]\n[<end> -69]  -> [<start> -65]\n[<for> 65: ;for (..name in av)] next <- [<start> -65]\n[<start> -65]  -> [<none> 73: ;..syms = av]\n[<none> 73: ;..syms = av]  -> [<end> -64]\n[<if> 64: ;if (length(av))] n -> [<end> -64]\n[<end> -64]  -> [<end> -62]\n[<if> 62: ;if (root == \":\" \\|\\| (root %chin% c(\"-\", \"!\") && is.call(jsub\\[\\[2L\\]\\]) && \n    jsub\\[\\[2L\\]\\]\\[\\[1L\\]\\] == \"(\" && is.call(jsub\\[\\[2L\\]\\]\\[\\[2L\\]\\]) && \n    jsub\\[\\[2L\\]\\]\\[\\[2L\\]\\]\\[\\[1L\\]\\] == \":\") \\|\\| ((!length(av <- all.vars(jsub)) \\|\\| \n    all(substring(av, 1L, 2L) == \"..\")) && root %chin% c(\"\", \n    \"c\", \"paste\", \"paste0\", \"-\", \"!\") && missingby))] n -> [<if> 74: ;if (is.name(jsub))]\n[<if> 74: ;if (is.name(jsub))] y -> [<if> 75: ;if (substring(jsub, 1L, 2L) == \"..\")]\n[<if> 75: ;if (substring(jsub, 1L, 2L) == \"..\")] y -> [<none> 76: ;stop(\"Internal error:  DT\\[, ..var\\] should be dealt with by the branch above now.\")]\n[<none> 76: ;stop(\"Internal error:  DT\\[, ..var\\] should be dealt with by the branch above now.\")]  -> [<stop> -76]\n[<if> 75: ;if (substring(jsub, 1L, 2L) == \"..\")] n -> [<end> -75]\n[<end> -75]  -> [<if> 77: ;if (!with && !exists(as.character(jsub), where = parent.frame()))]\n[<if> 77: ;if (!with && !exists(as.character(jsub), where = parent.frame()))] y -> [<none> 78: ;stop(\"Variable '\", jsub, \"' is not found in calling scope. Looking in calling scope because you set with=FALSE. Also, please use .. symbol prefix and remove with=FALSE.\")]\n[<none> 78: ;stop(\"Variable '\", jsub, \"' is not found in calling scope. Looking in calling scope because you set with=FALSE. Also, please use .. symbol prefix and remove with=FALSE.\")]  -> [<stop> -78]\n[<if> 77: ;if (!with && !exists(as.character(jsub), where = parent.frame()))] n -> [<end> -77]\n[<end> -77]  -> [<end> -74]\n[<if> 74: ;if (is.name(jsub))] n -> [<end> -74]\n[<end> -74]  -> [<end> -62]\n[<end> -62]  -> [<if> 79: ;if (root == \"{\")]\n[<if> 79: ;if (root == \"{\")] y -> [<if> 80: ;if (length(jsub) == 2L)]\n[<if> 80: ;if (length(jsub) == 2L)] y -> [<none> 81: ;jsub = jsub\\[\\[2L\\]\\];root = if (is.call(jsub)) as.character(jsub\\[\\[1L\\]\\])\\[1L\\] else \"\"]\n[<none> 81: ;jsub = jsub\\[\\[2L\\]\\];root = if (is.call(jsub)) as.character(jsub\\[\\[1L\\]\\])\\[1L\\] else \"\"]  -> [<end> -80]\n[<if> 80: ;if (length(jsub) == 2L)] n -> [<if> 82: ;if (length(jsub) > 2L && is.call(jsub\\[\\[2L\\]\\]) && jsub\\[\\[2L\\]\\]\\[\\[1L\\]\\] == \n    \":=\")]\n[<if> 82: ;if (length(jsub) > 2L && is.call(jsub\\[\\[2L\\]\\]) && jsub\\[\\[2L\\]\\]\\[\\[1L\\]\\] == \n    \":=\")] y -> [<none> 83: ;stop(\"You have wrapped := with {} which is ok but then := must be the only thing inside {}. You have something else inside {} as well. Consider placing the {} on the RHS of := instead; e.g. DT\\[,someCol:={tmpVar1<-...;tmpVar2<-...;tmpVar1*tmpVar2}\")]\n[<none> 83: ;stop(\"You have wrapped := with {} which is ok but then := must be the only thing inside {}. You have something else inside {} as well. Consider placing the {} on the RHS of := instead; e.g. DT\\[,someCol:={tmpVar1<-...;tmpVar2<-...;tmpVar1*tmpVar2}\")]  -> [<stop> -83]\n[<if> 82: ;if (length(jsub) > 2L && is.call(jsub\\[\\[2L\\]\\]) && jsub\\[\\[2L\\]\\]\\[\\[1L\\]\\] == \n    \":=\")] n -> [<end> -82]\n[<end> -82]  -> [<end> -80]\n[<end> -80]  -> [<end> -79]\n[<if> 79: ;if (root == \"{\")] n -> [<end> -79]\n[<end> -79]  -> [<if> 84: ;if (root == \"eval\" && !any(all.vars(jsub\\[\\[2L\\]\\]) %chin% names_x))]\n[<if> 84: ;if (root == \"eval\" && !any(all.vars(jsub\\[\\[2L\\]\\]) %chin% names_x))] y -> [<none> 85: ;jsub = eval(jsub\\[\\[2L\\]\\], parent.frame(), parent.frame())]\n[<none> 85: ;jsub = eval(jsub\\[\\[2L\\]\\], parent.frame(), parent.frame())]  -> [<if> 86: ;if (is.expression(jsub))]\n[<if> 86: ;if (is.expression(jsub))] y -> [<none> 87: ;jsub = jsub\\[\\[1L\\]\\]]\n[<none> 87: ;jsub = jsub\\[\\[1L\\]\\]]  -> [<end> -86]\n[<if> 86: ;if (is.expression(jsub))] n -> [<end> -86]\n[<end> -86]  -> [<none> 88: ;root = if (is.call(jsub)) {;    jsub = replace_dot_alias(jsub);    as.character(jsub\\[\\[1L\\]\\])\\[1L\\];} else \"\"]\n[<none> 88: ;root = if (is.call(jsub)) {;    jsub = replace_dot_alias(jsub);    as.character(jsub\\[\\[1L\\]\\])\\[1L\\];} else \"\"]  -> [<end> -84]\n[<if> 84: ;if (root == \"eval\" && !any(all.vars(jsub\\[\\[2L\\]\\]) %chin% names_x))] n -> [<end> -84]\n[<end> -84]  -> [<if> 89: ;if (root == \":=\")]\n[<if> 89: ;if (root == \":=\")] y -> [<none> 90: ;allow.cartesian = TRUE]\n[<none> 90: ;allow.cartesian = TRUE]  -> [<if> 91: ;if (!missing(i) && keyby)]\n[<if> 91: ;if (!missing(i) && keyby)] y -> [<none> 92: ;stop(\":= with keyby is only possible when i is not supplied since you can't setkey on a subset of rows. Either change keyby to by or remove i\")]\n[<none> 92: ;stop(\":= with keyby is only possible when i is not supplied since you can't setkey on a subset of rows. Either change keyby to by or remove i\")]  -> [<stop> -92]\n[<if> 91: ;if (!missing(i) && keyby)] n -> [<end> -91]\n[<end> -91]  -> [<if> 93: ;if (!missingnomatch)]\n[<if> 93: ;if (!missingnomatch)] y -> [<none> 94: ;warning(\"nomatch isn't relevant together with :=, ignoring nomatch\");nomatch = 0L]\n[<none> 94: ;warning(\"nomatch isn't relevant together with :=, ignoring nomatch\");nomatch = 0L]  -> [<end> -93]\n[<if> 93: ;if (!missingnomatch)] n -> [<end> -93]\n[<end> -93]  -> [<end> -89]\n[<if> 89: ;if (root == \":=\")] n -> [<end> -89]\n[<end> -89]  -> [<end> -60]\n[<if> 60: ;if (!missing(j))] n -> [<end> -60]\n[<end> -60]  -> [<none> 95: ;dupdiff = function(x, y) x\\[!x %chin% y\\]]\n[<none> 95: ;dupdiff = function(x, y) x\\[!x %chin% y\\]]  -> [<if> 96: ;if (!missing(i))]\n[<if> 96: ;if (!missing(i))] y -> [<none> 97: ;xo = NULL;isub = substitute(i)]\n[<none> 97: ;xo = NULL;isub = substitute(i)]  -> [<if> 98: ;if (identical(isub, NA))]\n[<if> 98: ;if (identical(isub, NA))] y -> [<none> 99: ;isub = NA_integer_]\n[<none> 99: ;isub = NA_integer_]  -> [<end> -98]\n[<if> 98: ;if (identical(isub, NA))] n -> [<end> -98]\n[<end> -98]  -> [<none> 100: ;isnull_inames = FALSE;restore.N = remove.N = FALSE]\n[<none> 100: ;isnull_inames = FALSE;restore.N = remove.N = FALSE]  -> [<if> 101: ;if (exists(\".N\", envir = parent.frame(), inherits = FALSE))]\n[<if> 101: ;if (exists(\".N\", envir = parent.frame(), inherits = FALSE))] y -> [<none> 102: ;old.N = get(\".N\", envir = parent.frame(), inherits = FALSE);locked.N = bindingIsLocked(\".N\", parent.frame())]\n[<none> 102: ;old.N = get(\".N\", envir = parent.frame(), inherits = FALSE);locked.N = bindingIsLocked(\".N\", parent.frame())]  -> [<if> 103: ;if (locked.N)]\n[<if> 103: ;if (locked.N)] y -> [<none> 104: ;eval(call(\"unlockBinding\", \".N\", parent.frame()))]\n[<none> 104: ;eval(call(\"unlockBinding\", \".N\", parent.frame()))]  -> [<end> -103]\n[<if> 103: ;if (locked.N)] n -> [<end> -103]\n[<end> -103]  -> [<none> 105: ;assign(\".N\", nrow(x), envir = parent.frame(), inherits = FALSE);restore.N = TRUE]\n[<none> 105: ;assign(\".N\", nrow(x), envir = parent.frame(), inherits = FALSE);restore.N = TRUE]  -> [<end> -101]\n[<if> 101: ;if (exists(\".N\", envir = parent.frame(), inherits = FALSE))] n -> [<none> 106: ;assign(\".N\", nrow(x), envir = parent.frame(), inherits = FALSE);remove.N = TRUE]\n[<none> 106: ;assign(\".N\", nrow(x), envir = parent.frame(), inherits = FALSE);remove.N = TRUE]  -> [<end> -101]\n[<end> -101]  -> [<if> 107: ;if (is.call(isub) && isub\\[\\[1L\\]\\] == \"eval\")]\n[<if> 107: ;if (is.call(isub) && isub\\[\\[1L\\]\\] == \"eval\")] y -> [<none> 108: ;isub = eval(.massagei(isub\\[\\[2L\\]\\]), parent.frame(), parent.frame())]\n[<none> 108: ;isub = eval(.massagei(isub\\[\\[2L\\]\\]), parent.frame(), parent.frame())]  -> [<if> 109: ;if (is.expression(isub))]\n[<if> 109: ;if (is.expression(isub))] y -> [<none> 110: ;isub = isub\\[\\[1L\\]\\]]\n[<none> 110: ;isub = isub\\[\\[1L\\]\\]]  -> [<end> -109]\n[<if> 109: ;if (is.expression(isub))] n -> [<end> -109]\n[<end> -109]  -> [<end> -107]\n[<if> 107: ;if (is.call(isub) && isub\\[\\[1L\\]\\] == \"eval\")] n -> [<end> -107]\n[<end> -107]  -> [<if> 111: ;if (is.call(isub) && isub\\[\\[1L\\]\\] == as.name(\"!\"))]\n[<if> 111: ;if (is.call(isub) && isub\\[\\[1L\\]\\] == as.name(\"!\"))] y -> [<none> 112: ;notjoin = TRUE]\n[<none> 112: ;notjoin = TRUE]  -> [<if> 113: ;if (!missingnomatch)]\n[<if> 113: ;if (!missingnomatch)] y -> [<none> 114: ;stop(\"not-join '!' prefix is present on i but nomatch is provided. Please remove nomatch.\")]\n[<none> 114: ;stop(\"not-join '!' prefix is present on i but nomatch is provided. Please remove nomatch.\")]  -> [<stop> -114]\n[<if> 113: ;if (!missingnomatch)] n -> [<end> -113]\n[<end> -113]  -> [<none> 115: ;nomatch = 0L;isub = isub\\[\\[2L\\]\\]]\n[<none> 115: ;nomatch = 0L;isub = isub\\[\\[2L\\]\\]]  -> [<if> 116: ;if (is.call(isub) && isub\\[\\[1L\\]\\] == \"(\" && !is.name(isub\\[\\[2L\\]\\]))]\n[<if> 116: ;if (is.call(isub) && isub\\[\\[1L\\]\\] == \"(\" && !is.name(isub\\[\\[2L\\]\\]))] y -> [<none> 117: ;isub = isub\\[\\[2L\\]\\]]\n[<none> 117: ;isub = isub\\[\\[2L\\]\\]]  -> [<end> -116]\n[<if> 116: ;if (is.call(isub) && isub\\[\\[1L\\]\\] == \"(\" && !is.name(isub\\[\\[2L\\]\\]))] n -> [<end> -116]\n[<end> -116]  -> [<end> -111]\n[<if> 111: ;if (is.call(isub) && isub\\[\\[1L\\]\\] == as.name(\"!\"))] n -> [<end> -111]\n[<end> -111]  -> [<if> 118: ;if (is.null(isub))]\n[<if> 118: ;if (is.null(isub))] y -> [<none> 119: ;return(null.data.table())]\n[<none> 119: ;return(null.data.table())]  -> [<return> -119]\n[<if> 118: ;if (is.null(isub))] n -> [<end> -118]\n[<end> -118]  -> [<if> 120: ;if (length(o <- .prepareFastSubset(isub = isub, x = x, enclos = parent.frame(), \n    notjoin = notjoin, verbose = verbose)))]\n[<if> 120: ;if (length(o <- .prepareFastSubset(isub = isub, x = x, enclos = parent.frame(), \n    notjoin = notjoin, verbose = verbose)))] y -> [<none> 121: ;optimizedSubset = TRUE;notjoin = o$notjoin;i = o$i;on = o$on;nomatch = 0L;mult = \"all\"]\n[<none> 121: ;optimizedSubset = TRUE;notjoin = o$notjoin;i = o$i;on = o$on;nomatch = 0L;mult = \"all\"]  -> [<end> -120]\n[<if> 120: ;if (length(o <- .prepareFastSubset(isub = isub, x = x, enclos = parent.frame(), \n    notjoin = notjoin, verbose = verbose)))] n -> [<if> 122: ;if (!is.name(isub))]\n[<if> 122: ;if (!is.name(isub))] y -> [<none> 123: ;ienv = new.env(parent = parent.frame())]\n[<none> 123: ;ienv = new.env(parent = parent.frame())]  -> [<if> 124: ;if (getOption(\"datatable.optimize\") >= 1L)]\n[<if> 124: ;if (getOption(\"datatable.optimize\") >= 1L)] y -> [<none> 125: ;assign(\"order\", forder, ienv)]\n[<none> 125: ;assign(\"order\", forder, ienv)]  -> [<end> -124]\n[<if> 124: ;if (getOption(\"datatable.optimize\") >= 1L)] n -> [<end> -124]\n[<end> -124]  -> [<none> 126: ;i = tryCatch(eval(.massagei(isub), x, ienv), error = function(e) .checkTypos(e, ;    names_x))]\n[<none> 126: ;i = tryCatch(eval(.massagei(isub), x, ienv), error = function(e) .checkTypos(e, ;    names_x))]  -> [<end> -122]\n[<if> 122: ;if (!is.name(isub))] n -> [<none> 127: ;i = try(eval(isub, parent.frame(), parent.frame()), silent = TRUE)]\n[<none> 127: ;i = try(eval(isub, parent.frame(), parent.frame()), silent = TRUE)]  -> [<if> 128: ;if (inherits(i, \"try-error\"))]\n[<if> 128: ;if (inherits(i, \"try-error\"))] y -> [<none> 129: ;col = try(eval(isub, x), silent = TRUE);msg = if (inherits(col, \"try-error\")) \" and it is not a column name either.\" else paste0(\" but it is a column of type \", ;    typeof(col), \". If you wish to select rows where that column contains TRUE\", ;    \", or perhaps that column contains row numbers of itself to select, try DT\\[(col)\\], DT\\[DT$col\\], or DT\\[col==TRUE\\] is particularly clear and is optimized.\");stop(as.character(isub), \" is not found in calling scope\", msg, ;    \" When the first argument inside DT\\[...\\] is a single symbol (e.g. DT\\[var\\]), data.table looks for var in calling scope.\")]\n[<none> 129: ;col = try(eval(isub, x), silent = TRUE);msg = if (inherits(col, \"try-error\")) \" and it is not a column name either.\" else paste0(\" but it is a column of type \", ;    typeof(col), \". If you wish to select rows where that column contains TRUE\", ;    \", or perhaps that column contains row numbers of itself to select, try DT\\[(col)\\], DT\\[DT$col\\], or DT\\[col==TRUE\\] is particularly clear and is optimized.\");stop(as.character(isub), \" is not found in calling scope\", msg, ;    \" When the first argument inside DT\\[...\\] is a single symbol (e.g. DT\\[var\\]), data.table looks for var in calling scope.\")]  -> [<stop> -129]\n[<if> 128: ;if (inherits(i, \"try-error\"))] n -> [<end> -128]\n[<end> -128]  -> [<end> -122]\n[<end> -122]  -> [<end> -120]\n[<end> -120]  -> [<if> 130: ;if (restore.N)]\n[<if> 130: ;if (restore.N)] y -> [<none> 131: ;assign(\".N\", old.N, envir = parent.frame())]\n[<none> 131: ;assign(\".N\", old.N, envir = parent.frame())]  -> [<if> 132: ;if (locked.N)]\n[<if> 132: ;if (locked.N)] y -> [<none> 133: ;lockBinding(\".N\", parent.frame())]\n[<none> 133: ;lockBinding(\".N\", parent.frame())]  -> [<end> -132]\n[<if> 132: ;if (locked.N)] n -> [<end> -132]\n[<end> -132]  -> [<end> -130]\n[<if> 130: ;if (restore.N)] n -> [<end> -130]\n[<end> -130]  -> [<if> 134: ;if (remove.N)]\n[<if> 134: ;if (remove.N)] y -> [<none> 135: ;rm(list = \".N\", envir = parent.frame())]\n[<none> 135: ;rm(list = \".N\", envir = parent.frame())]  -> [<end> -134]\n[<if> 134: ;if (remove.N)] n -> [<end> -134]\n[<end> -134]  -> [<if> 136: ;if (is.matrix(i))]\n[<if> 136: ;if (is.matrix(i))] y -> [<if> 137: ;if (is.numeric(i) && ncol(i) == 1L)]\n[<if> 137: ;if (is.numeric(i) && ncol(i) == 1L)] y -> [<none> 138: ;i = as.integer(i)]\n[<none> 138: ;i = as.integer(i)]  -> [<end> -137]\n[<if> 137: ;if (is.numeric(i) && ncol(i) == 1L)] n -> [<none> 139: ;stop(\"i is invalid type (matrix). Perhaps in future a 2 column matrix could return a list of elements of DT (in the spirit of A\\[B\\] in FAQ 2.14). Please report to data.table issue tracker if you'd like this, or add your comments to FR #657.\")]\n[<none> 139: ;stop(\"i is invalid type (matrix). Perhaps in future a 2 column matrix could return a list of elements of DT (in the spirit of A\\[B\\] in FAQ 2.14). Please report to data.table issue tracker if you'd like this, or add your comments to FR #657.\")]  -> [<stop> -139]\n[<end> -137]  -> [<end> -136]\n[<if> 136: ;if (is.matrix(i))] n -> [<end> -136]\n[<end> -136]  -> [<if> 140: ;if (is.logical(i))]\n[<if> 140: ;if (is.logical(i))] y -> [<if> 141: ;if (notjoin)]\n[<if> 141: ;if (notjoin)] y -> [<none> 142: ;notjoin = FALSE;i = !i]\n[<none> 142: ;notjoin = FALSE;i = !i]  -> [<end> -141]\n[<if> 141: ;if (notjoin)] n -> [<end> -141]\n[<end> -141]  -> [<end> -140]\n[<if> 140: ;if (is.logical(i))] n -> [<end> -140]\n[<end> -140]  -> [<if> 143: ;if (is.null(i))]\n[<if> 143: ;if (is.null(i))] y -> [<none> 144: ;return(null.data.table())]\n[<none> 144: ;return(null.data.table())]  -> [<return> -144]\n[<if> 143: ;if (is.null(i))] n -> [<end> -143]\n[<end> -143]  -> [<if> 145: ;if (is.character(i))]\n[<if> 145: ;if (is.character(i))] y -> [<none> 146: ;isnull_inames = TRUE;i = data.table(V1 = i)]\n[<none> 146: ;isnull_inames = TRUE;i = data.table(V1 = i)]  -> [<end> -145]\n[<if> 145: ;if (is.character(i))] n -> [<if> 147: ;if (identical(class(i), \"list\") && length(i) == 1L && is.data.frame(i\\[\\[1L\\]\\]))]\n[<if> 147: ;if (identical(class(i), \"list\") && length(i) == 1L && is.data.frame(i\\[\\[1L\\]\\]))] y -> [<none> 148: ;i = as.data.table(i\\[\\[1L\\]\\])]\n[<none> 148: ;i = as.data.table(i\\[\\[1L\\]\\])]  -> [<end> -147]\n[<if> 147: ;if (identical(class(i), \"list\") && length(i) == 1L && is.data.frame(i\\[\\[1L\\]\\]))] n -> [<if> 149: ;if (identical(class(i), \"data.frame\"))]\n[<if> 149: ;if (identical(class(i), \"data.frame\"))] y -> [<none> 150: ;i = as.data.table(i)]\n[<none> 150: ;i = as.data.table(i)]  -> [<end> -149]\n[<if> 149: ;if (identical(class(i), \"data.frame\"))] n -> [<if> 151: ;if (identical(class(i), \"list\"))]\n[<if> 151: ;if (identical(class(i), \"list\"))] y -> [<none> 152: ;isnull_inames = is.null(names(i));i = as.data.table(i)]\n[<none> 152: ;isnull_inames = is.null(names(i));i = as.data.table(i)]  -> [<end> -151]\n[<if> 151: ;if (identical(class(i), \"list\"))] n -> [<end> -151]\n[<end> -151]  -> [<end> -149]\n[<end> -149]  -> [<end> -147]\n[<end> -147]  -> [<end> -145]\n[<end> -145]  -> [<if> 153: ;if (is.data.table(i))]\n[<if> 153: ;if (is.data.table(i))] y -> [<if> 154: ;if (missing(on))]\n[<if> 154: ;if (missing(on))] y -> [<if> 155: ;if (!haskey(x))]\n[<if> 155: ;if (!haskey(x))] y -> [<none> 156: ;stop(\"When i is a data.table (or character vector), the columns to join by must be specified using 'on=' argument (see ?data.table), by keying x (i.e. sorted, and, marked as sorted, see ?setkey), or by sharing column names between x and i (i.e., a natural join). Keyed joins might have further speed benefits on very large data due to x being sorted in RAM.\")]\n[<none> 156: ;stop(\"When i is a data.table (or character vector), the columns to join by must be specified using 'on=' argument (see ?data.table), by keying x (i.e. sorted, and, marked as sorted, see ?setkey), or by sharing column names between x and i (i.e., a natural join). Keyed joins might have further speed benefits on very large data due to x being sorted in RAM.\")]  -> [<stop> -156]\n[<if> 155: ;if (!haskey(x))] n -> [<end> -155]\n[<end> -155]  -> [<end> -154]\n[<if> 154: ;if (missing(on))] n -> [<if> 157: ;if (identical(substitute(on), as.name(\".NATURAL\")))]\n[<if> 157: ;if (identical(substitute(on), as.name(\".NATURAL\")))] y -> [<none> 158: ;naturaljoin = TRUE]\n[<none> 158: ;naturaljoin = TRUE]  -> [<end> -157]\n[<if> 157: ;if (identical(substitute(on), as.name(\".NATURAL\")))] n -> [<end> -157]\n[<end> -157]  -> [<end> -154]\n[<end> -154]  -> [<if> 159: ;if (naturaljoin)]\n[<if> 159: ;if (naturaljoin)] y -> [<none> 160: ;common_names = intersect(names_x, names(i));len_common_names = length(common_names)]\n[<none> 160: ;common_names = intersect(names_x, names(i));len_common_names = length(common_names)]  -> [<if> 161: ;if (!len_common_names)]\n[<if> 161: ;if (!len_common_names)] y -> [<none> 162: ;stop(\"Attempting to do natural join but no common columns in provided tables\")]\n[<none> 162: ;stop(\"Attempting to do natural join but no common columns in provided tables\")]  -> [<stop> -162]\n[<if> 161: ;if (!len_common_names)] n -> [<end> -161]\n[<end> -161]  -> [<if> 163: ;if (verbose)]\n[<if> 163: ;if (verbose)] y -> [<none> 164: ;which_cols_msg = if (len_common_names == length(x)) \" all 'x' columns\" else paste(\":\", ;    brackify(common_names));cat(\"Joining but 'x' has no key, natural join using\", which_cols_msg, ;    \"\\n\", sep = \"\")]\n[<none> 164: ;which_cols_msg = if (len_common_names == length(x)) \" all 'x' columns\" else paste(\":\", ;    brackify(common_names));cat(\"Joining but 'x' has no key, natural join using\", which_cols_msg, ;    \"\\n\", sep = \"\")]  -> [<end> -163]\n[<if> 163: ;if (verbose)] n -> [<end> -163]\n[<end> -163]  -> [<none> 165: ;on = common_names]\n[<none> 165: ;on = common_names]  -> [<end> -159]\n[<if> 159: ;if (naturaljoin)] n -> [<end> -159]\n[<end> -159]  -> [<if> 166: ;if (!missing(on))]\n[<if> 166: ;if (!missing(on))] y -> [<none> 167: ;on_ops = .parse_on(substitute(on), isnull_inames);on = on_ops\\[\\[1L\\]\\];ops = on_ops\\[\\[2L\\]\\];rightcols = colnamesInt(x, names(on), check_dups = FALSE);leftcols = colnamesInt(i, unname(on), check_dups = FALSE)]\n[<none> 167: ;on_ops = .parse_on(substitute(on), isnull_inames);on = on_ops\\[\\[1L\\]\\];ops = on_ops\\[\\[2L\\]\\];rightcols = colnamesInt(x, names(on), check_dups = FALSE);leftcols = colnamesInt(i, unname(on), check_dups = FALSE)]  -> [<end> -166]\n[<if> 166: ;if (!missing(on))] n -> [<none> 168: ;rightcols = chmatch(key(x), names_x);leftcols = if (haskey(i)) chmatch(head(key(i), length(rightcols)), ;    names(i)) else seq_len(min(length(i), length(rightcols)));rightcols = head(rightcols, length(leftcols));ops = rep(1L, length(leftcols))]\n[<none> 168: ;rightcols = chmatch(key(x), names_x);leftcols = if (haskey(i)) chmatch(head(key(i), length(rightcols)), ;    names(i)) else seq_len(min(length(i), length(rightcols)));rightcols = head(rightcols, length(leftcols));ops = rep(1L, length(leftcols))]  -> [<end> -166]\n[<end> -166]  -> [<if> 169: ;if (notjoin && (byjoin \\|\\| mult != \"all\"))]\n[<if> 169: ;if (notjoin && (byjoin \\|\\| mult != \"all\"))] y -> [<none> 170: ;notjoin = FALSE]\n[<none> 170: ;notjoin = FALSE]  -> [<if> 171: ;if (verbose)]\n[<if> 171: ;if (verbose)] y -> [<none> 172: ;last.started.at = proc.time();cat(\"not-join called with 'by=.EACHI'; Replacing !i with i=setdiff_(x,i) ...\");flush.console()]\n[<none> 172: ;last.started.at = proc.time();cat(\"not-join called with 'by=.EACHI'; Replacing !i with i=setdiff_(x,i) ...\");flush.console()]  -> [<end> -171]\n[<if> 171: ;if (verbose)] n -> [<end> -171]\n[<end> -171]  -> [<none> 173: ;orignames = copy(names(i));i = setdiff_(x, i, rightcols, leftcols)]\n[<none> 173: ;orignames = copy(names(i));i = setdiff_(x, i, rightcols, leftcols)]  -> [<if> 174: ;if (verbose)]\n[<if> 174: ;if (verbose)] y -> [<none> 175: ;cat(\"done in\", timetaken(last.started.at), \"\\n\");flush.console()]\n[<none> 175: ;cat(\"done in\", timetaken(last.started.at), \"\\n\");flush.console()]  -> [<end> -174]\n[<if> 174: ;if (verbose)] n -> [<end> -174]\n[<end> -174]  -> [<none> 176: ;setnames(i, orignames\\[leftcols\\]);setattr(i, \"sorted\", names(i))]\n[<none> 176: ;setnames(i, orignames\\[leftcols\\]);setattr(i, \"sorted\", names(i))]  -> [<end> -169]\n[<if> 169: ;if (notjoin && (byjoin \\|\\| mult != \"all\"))] n -> [<end> -169]\n[<end> -169]  -> [<none> 177: ;i = .shallow(i, retain.key = TRUE);ans = bmerge(i, x, leftcols, rightcols, roll, rollends, nomatch, ;    mult, ops, verbose = verbose);xo = ans$xo]\n[<none> 177: ;i = .shallow(i, retain.key = TRUE);ans = bmerge(i, x, leftcols, rightcols, roll, rollends, nomatch, ;    mult, ops, verbose = verbose);xo = ans$xo]  -> [<if> 178: ;if (length(ans$indices))]\n[<if> 178: ;if (length(ans$indices))] y -> [<none> 179: ;setorder(setDT(ans\\[1L:3L\\]), indices)]\n[<none> 179: ;setorder(setDT(ans\\[1L:3L\\]), indices)]  -> [<end> -178]\n[<if> 178: ;if (length(ans$indices))] n -> [<end> -178]\n[<end> -178]  -> [<none> 180: ;allLen1 = ans$allLen1;f__ = ans$starts;len__ = ans$lens;allGrp1 = FALSE;indices__ = if (length(ans$indices)) ans$indices else seq_along(f__)]\n[<none> 180: ;allLen1 = ans$allLen1;f__ = ans$starts;len__ = ans$lens;allGrp1 = FALSE;indices__ = if (length(ans$indices)) ans$indices else seq_along(f__)]  -> [<if> 181: ;if (is.na(which))]\n[<if> 181: ;if (is.na(which))] y -> [<none> 182: ;w = if (notjoin) f__ != 0L else is.na(f__);return(if (length(xo)) fsort(xo\\[w\\], internal = TRUE) else which(w))]\n[<none> 182: ;w = if (notjoin) f__ != 0L else is.na(f__);return(if (length(xo)) fsort(xo\\[w\\], internal = TRUE) else which(w))]  -> [<return> -182]\n[<if> 181: ;if (is.na(which))] n -> [<end> -181]\n[<end> -181]  -> [<if> 183: ;if (mult == \"all\")]\n[<if> 183: ;if (mult == \"all\")] y -> [<none> 184: ;nqbyjoin = byjoin && length(ans$indices) && !allGrp1]\n[<none> 184: ;nqbyjoin = byjoin && length(ans$indices) && !allGrp1]  -> [<if> 185: ;if (!byjoin \\|\\| nqbyjoin)]\n[<if> 185: ;if (!byjoin \\|\\| nqbyjoin)] y -> [<if> 186: ;if (verbose)]\n[<if> 186: ;if (verbose)] y -> [<none> 187: ;last.started.at = proc.time();cat(\"Constructing irows for '!byjoin \\|\\| nqbyjoin' ... \");flush.console()]\n[<none> 187: ;last.started.at = proc.time();cat(\"Constructing irows for '!byjoin \\|\\| nqbyjoin' ... \");flush.console()]  -> [<end> -186]\n[<if> 186: ;if (verbose)] n -> [<end> -186]\n[<end> -186]  -> [<none> 188: ;irows = if (allLen1) f__ else vecseq(f__, len__, if (allow.cartesian \\|\\| ;    notjoin \\|\\| !anyDuplicated(f__, incomparables = c(0L, NA_integer_))) {;    NULL;} else as.double(nrow(x) + nrow(i)))]\n[<none> 188: ;irows = if (allLen1) f__ else vecseq(f__, len__, if (allow.cartesian \\|\\| ;    notjoin \\|\\| !anyDuplicated(f__, incomparables = c(0L, NA_integer_))) {;    NULL;} else as.double(nrow(x) + nrow(i)))]  -> [<if> 189: ;if (verbose)]\n[<if> 189: ;if (verbose)] y -> [<none> 190: ;cat(timetaken(last.started.at), \"\\n\");flush.console()]\n[<none> 190: ;cat(timetaken(last.started.at), \"\\n\");flush.console()]  -> [<end> -189]\n[<if> 189: ;if (verbose)] n -> [<end> -189]\n[<end> -189]  -> [<if> 191: ;if (identical(nomatch, 0L) && allLen1)]\n[<if> 191: ;if (identical(nomatch, 0L) && allLen1)] y -> [<none> 192: ;irows = irows\\[irows != 0L\\]]\n[<none> 192: ;irows = irows\\[irows != 0L\\]]  -> [<end> -191]\n[<if> 191: ;if (identical(nomatch, 0L) && allLen1)] n -> [<end> -191]\n[<end> -191]  -> [<end> -185]\n[<if> 185: ;if (!byjoin \\|\\| nqbyjoin)] n -> [<if> 193: ;if (length(xo) && missing(on))]\n[<if> 193: ;if (length(xo) && missing(on))] y -> [<none> 194: ;stop(\"Internal error. Cannot by=.EACHI when joining to a secondary key, yet\")]\n[<none> 194: ;stop(\"Internal error. Cannot by=.EACHI when joining to a secondary key, yet\")]  -> [<stop> -194]\n[<if> 193: ;if (length(xo) && missing(on))] n -> [<end> -193]\n[<end> -193]  -> [<if> 195: ;if (length(irows))]\n[<if> 195: ;if (length(irows))] y -> [<none> 196: ;stop(\"Internal error. irows has length in by=.EACHI\")]\n[<none> 196: ;stop(\"Internal error. irows has length in by=.EACHI\")]  -> [<stop> -196]\n[<if> 195: ;if (length(irows))] n -> [<end> -195]\n[<end> -195]  -> [<end> -185]\n[<end> -185]  -> [<if> 197: ;if (nqbyjoin)]\n[<if> 197: ;if (nqbyjoin)] y -> [<none> 198: ;irows = if (length(xo)) xo\\[irows\\] else irows;xo = setorder(setDT(list(indices = rep.int(indices__, len__), ;    irows = irows)))\\[\\[\"irows\"\\]\\];ans = .Call(CnqRecreateIndices, xo, len__, indices__, max(indices__));f__ = ans\\[\\[1L\\]\\];len__ = ans\\[\\[2L\\]\\];allLen1 = FALSE;irows = NULL]\n[<none> 198: ;irows = if (length(xo)) xo\\[irows\\] else irows;xo = setorder(setDT(list(indices = rep.int(indices__, len__), ;    irows = irows)))\\[\\[\"irows\"\\]\\];ans = .Call(CnqRecreateIndices, xo, len__, indices__, max(indices__));f__ = ans\\[\\[1L\\]\\];len__ = ans\\[\\[2L\\]\\];allLen1 = FALSE;irows = NULL]  -> [<if> 199: ;if (any_na(as_list(xo)))]\n[<if> 199: ;if (any_na(as_list(xo)))] y -> [<none> 200: ;xo = xo\\[!is.na(xo)\\]]\n[<none> 200: ;xo = xo\\[!is.na(xo)\\]]  -> [<end> -199]\n[<if> 199: ;if (any_na(as_list(xo)))] n -> [<end> -199]\n[<end> -199]  -> [<end> -197]\n[<if> 197: ;if (nqbyjoin)] n -> [<end> -197]\n[<end> -197]  -> [<end> -183]\n[<if> 183: ;if (mult == \"all\")] n -> [<if> 201: ;if (!byjoin)]\n[<if> 201: ;if (!byjoin)] y -> [<none> 202: ;irows = f__]\n[<none> 202: ;irows = f__]  -> [<if> 203: ;if (identical(nomatch, 0L))]\n[<if> 203: ;if (identical(nomatch, 0L))] y -> [<none> 204: ;irows = irows\\[len__ > 0L\\]]\n[<none> 204: ;irows = irows\\[len__ > 0L\\]]  -> [<end> -203]\n[<if> 203: ;if (identical(nomatch, 0L))] n -> [<end> -203]\n[<end> -203]  -> [<end> -201]\n[<if> 201: ;if (!byjoin)] n -> [<end> -201]\n[<end> -201]  -> [<end> -183]\n[<end> -183]  -> [<if> 205: ;if (length(xo) && length(irows))]\n[<if> 205: ;if (length(xo) && length(irows))] y -> [<none> 206: ;irows = xo\\[irows\\]]\n[<none> 206: ;irows = xo\\[irows\\]]  -> [<if> 207: ;if (mult == \"all\" && !allGrp1)]\n[<if> 207: ;if (mult == \"all\" && !allGrp1)] y -> [<if> 208: ;if (verbose)]\n[<if> 208: ;if (verbose)] y -> [<none> 209: ;last.started.at = proc.time();cat(\"Reorder irows for 'mult==\\\"all\\\" && !allGrp1' ... \");flush.console()]\n[<none> 209: ;last.started.at = proc.time();cat(\"Reorder irows for 'mult==\\\"all\\\" && !allGrp1' ... \");flush.console()]  -> [<end> -208]\n[<if> 208: ;if (verbose)] n -> [<end> -208]\n[<end> -208]  -> [<none> 210: ;irows = setorder(setDT(list(indices = rep.int(indices__, len__), ;    irows = irows)))\\[\\[\"irows\"\\]\\]]\n[<none> 210: ;irows = setorder(setDT(list(indices = rep.int(indices__, len__), ;    irows = irows)))\\[\\[\"irows\"\\]\\]]  -> [<if> 211: ;if (verbose)]\n[<if> 211: ;if (verbose)] y -> [<none> 212: ;cat(timetaken(last.started.at), \"\\n\");flush.console()]\n[<none> 212: ;cat(timetaken(last.started.at), \"\\n\");flush.console()]  -> [<end> -211]\n[<if> 211: ;if (verbose)] n -> [<end> -211]\n[<end> -211]  -> [<end> -207]\n[<if> 207: ;if (mult == \"all\" && !allGrp1)] n -> [<end> -207]\n[<end> -207]  -> [<end> -205]\n[<if> 205: ;if (length(xo) && length(irows))] n -> [<end> -205]\n[<end> -205]  -> [<if> 213: ;if (optimizedSubset)]\n[<if> 213: ;if (optimizedSubset)] y -> [<if> 214: ;if (!.Call(CisOrderedSubset, irows, nrow(x)))]\n[<if> 214: ;if (!.Call(CisOrderedSubset, irows, nrow(x)))] y -> [<if> 215: ;if (verbose)]\n[<if> 215: ;if (verbose)] y -> [<none> 216: ;last.started.at = proc.time()\\[3L\\];cat(\"Reordering\", length(irows), \"rows after bmerge done in ... \");flush.console()]\n[<none> 216: ;last.started.at = proc.time()\\[3L\\];cat(\"Reordering\", length(irows), \"rows after bmerge done in ... \");flush.console()]  -> [<end> -215]\n[<if> 215: ;if (verbose)] n -> [<end> -215]\n[<end> -215]  -> [<if> 217: ;if (length(irows) < 1e+06)]\n[<if> 217: ;if (length(irows) < 1e+06)] y -> [<none> 218: ;irows = fsort(irows, internal = TRUE)]\n[<none> 218: ;irows = fsort(irows, internal = TRUE)]  -> [<end> -217]\n[<if> 217: ;if (length(irows) < 1e+06)] n -> [<none> 219: ;irows = as.integer(fsort(as.numeric(irows)))]\n[<none> 219: ;irows = as.integer(fsort(as.numeric(irows)))]  -> [<end> -217]\n[<end> -217]  -> [<if> 220: ;if (verbose)]\n[<if> 220: ;if (verbose)] y -> [<none> 221: ;cat(round(proc.time()\\[3L\\] - last.started.at, 3L), \"secs\\n\");flush.console()]\n[<none> 221: ;cat(round(proc.time()\\[3L\\] - last.started.at, 3L), \"secs\\n\");flush.console()]  -> [<end> -220]\n[<if> 220: ;if (verbose)] n -> [<end> -220]\n[<end> -220]  -> [<end> -214]\n[<if> 214: ;if (!.Call(CisOrderedSubset, irows, nrow(x)))] n -> [<end> -214]\n[<end> -214]  -> [<none> 222: ;leftcols = integer(0L);rightcols = integer(0L);i = irows]\n[<none> 222: ;leftcols = integer(0L);rightcols = integer(0L);i = irows]  -> [<end> -213]\n[<if> 213: ;if (optimizedSubset)] n -> [<end> -213]\n[<end> -213]  -> [<end> -153]\n[<if> 153: ;if (is.data.table(i))] n -> [<if> 223: ;if (!missing(on))]\n[<if> 223: ;if (!missing(on))] y -> [<none> 224: ;stop(\"logical error. i is not a data.table, but 'on' argument is provided.\")]\n[<none> 224: ;stop(\"logical error. i is not a data.table, but 'on' argument is provided.\")]  -> [<stop> -224]\n[<if> 223: ;if (!missing(on))] n -> [<end> -223]\n[<end> -223]  -> [<if> 225: ;if (!is.logical(i) && !is.numeric(i))]\n[<if> 225: ;if (!is.logical(i) && !is.numeric(i))] y -> [<none> 226: ;stop(\"i has evaluated to type \", typeof(i), \". Expecting logical, integer or double.\")]\n[<none> 226: ;stop(\"i has evaluated to type \", typeof(i), \". Expecting logical, integer or double.\")]  -> [<stop> -226]\n[<if> 225: ;if (!is.logical(i) && !is.numeric(i))] n -> [<end> -225]\n[<end> -225]  -> [<if> 227: ;if (is.logical(i))]\n[<if> 227: ;if (is.logical(i))] y -> [<if> 228: ;if (length(i) == 1L && isTRUE(unname(i)))]\n[<if> 228: ;if (length(i) == 1L && isTRUE(unname(i)))] y -> [<none> 229: ;irows = i = NULL]\n[<none> 229: ;irows = i = NULL]  -> [<end> -228]\n[<if> 228: ;if (length(i) == 1L && isTRUE(unname(i)))] n -> [<if> 230: ;if (length(i) <= 1L)]\n[<if> 230: ;if (length(i) <= 1L)] y -> [<none> 231: ;irows = i = integer(0L)]\n[<none> 231: ;irows = i = integer(0L)]  -> [<end> -230]\n[<if> 230: ;if (length(i) <= 1L)] n -> [<if> 232: ;if (length(i) == nrow(x))]\n[<if> 232: ;if (length(i) == nrow(x))] y -> [<none> 233: ;irows = i = which(i)]\n[<none> 233: ;irows = i = which(i)]  -> [<end> -232]\n[<if> 232: ;if (length(i) == nrow(x))] n -> [<none> 234: ;stop(\"i evaluates to a logical vector length \", length(i), \" but there are \", ;    nrow(x), \" rows. Recycling of logical i is no longer allowed as it hides more bugs than is worth the rare convenience. Explicitly use rep(...,length=.N) if you really need to recycle.\")]\n[<none> 234: ;stop(\"i evaluates to a logical vector length \", length(i), \" but there are \", ;    nrow(x), \" rows. Recycling of logical i is no longer allowed as it hides more bugs than is worth the rare convenience. Explicitly use rep(...,length=.N) if you really need to recycle.\")]  -> [<stop> -234]\n[<end> -232]  -> [<end> -230]\n[<end> -230]  -> [<end> -228]\n[<end> -228]  -> [<end> -227]\n[<if> 227: ;if (is.logical(i))] n -> [<none> 235: ;irows = as.integer(i);irows = .Call(CconvertNegAndZeroIdx, irows, nrow(x), is.null(jsub) \\|\\| ;    root != \":=\")]\n[<none> 235: ;irows = as.integer(i);irows = .Call(CconvertNegAndZeroIdx, irows, nrow(x), is.null(jsub) \\|\\| ;    root != \":=\")]  -> [<end> -227]\n[<end> -227]  -> [<end> -153]\n[<end> -153]  -> [<if> 236: ;if (notjoin)]\n[<if> 236: ;if (notjoin)] y -> [<if> 237: ;if (byjoin \\|\\| !is.integer(irows) \\|\\| is.na(nomatch))]\n[<if> 237: ;if (byjoin \\|\\| !is.integer(irows) \\|\\| is.na(nomatch))] y -> [<none> 238: ;stop(\"Internal error: notjoin but byjoin or !integer or nomatch==NA\")]\n[<none> 238: ;stop(\"Internal error: notjoin but byjoin or !integer or nomatch==NA\")]  -> [<stop> -238]\n[<if> 237: ;if (byjoin \\|\\| !is.integer(irows) \\|\\| is.na(nomatch))] n -> [<end> -237]\n[<end> -237]  -> [<none> 239: ;irows = irows\\[irows != 0L\\]]\n[<none> 239: ;irows = irows\\[irows != 0L\\]]  -> [<if> 240: ;if (verbose)]\n[<if> 240: ;if (verbose)] y -> [<none> 241: ;last.started.at = proc.time()\\[3L\\];cat(\"Inverting irows for notjoin done in ... \");flush.console()]\n[<none> 241: ;last.started.at = proc.time()\\[3L\\];cat(\"Inverting irows for notjoin done in ... \");flush.console()]  -> [<end> -240]\n[<if> 240: ;if (verbose)] n -> [<end> -240]\n[<end> -240]  -> [<none> 242: ;i = irows = if (length(irows)) seq_len(nrow(x))\\[-irows\\] else NULL]\n[<none> 242: ;i = irows = if (length(irows)) seq_len(nrow(x))\\[-irows\\] else NULL]  -> [<if> 243: ;if (verbose)]\n[<if> 243: ;if (verbose)] y -> [<none> 244: ;cat(round(proc.time()\\[3L\\] - last.started.at, 3L), \"sec\\n\")]\n[<none> 244: ;cat(round(proc.time()\\[3L\\] - last.started.at, 3L), \"sec\\n\")]  -> [<end> -243]\n[<if> 243: ;if (verbose)] n -> [<end> -243]\n[<end> -243]  -> [<none> 245: ;leftcols = integer();rightcols = integer()]\n[<none> 245: ;leftcols = integer();rightcols = integer()]  -> [<end> -236]\n[<if> 236: ;if (notjoin)] n -> [<end> -236]\n[<end> -236]  -> [<if> 246: ;if (which)]\n[<if> 246: ;if (which)] y -> [<none> 247: ;return(if (is.null(irows)) seq_len(nrow(x)) else irows)]\n[<none> 247: ;return(if (is.null(irows)) seq_len(nrow(x)) else irows)]  -> [<return> -247]\n[<if> 246: ;if (which)] n -> [<end> -246]\n[<end> -246]  -> [<end> -96]\n[<if> 96: ;if (!missing(i))] n -> [<none> 248: ;i = NULL]\n[<none> 248: ;i = NULL]  -> [<end> -96]\n[<end> -96]  -> [<none> 249: ;names_i = names(i);byval = NULL;xnrow = nrow(x);xcols = xcolsAns = icols = icolsAns = integer();xdotcols = FALSE;non_sdvars = character(0L)]\n[<none> 249: ;names_i = names(i);byval = NULL;xnrow = nrow(x);xcols = xcolsAns = icols = icolsAns = integer();xdotcols = FALSE;non_sdvars = character(0L)]  -> [<if> 250: ;if (missing(j))]\n[<if> 250: ;if (missing(j))] y -> [<if> 251: ;if (!length(x))]\n[<if> 251: ;if (!length(x))] y -> [<none> 252: ;return(null.data.table())]\n[<none> 252: ;return(null.data.table())]  -> [<return> -252]\n[<if> 251: ;if (!length(x))] n -> [<end> -251]\n[<end> -251]  -> [<if> 253: ;if (!length(leftcols))]\n[<if> 253: ;if (!length(leftcols))] y -> [<if> 254: ;if (is.null(irows))]\n[<if> 254: ;if (is.null(irows))] y -> [<none> 255: ;return(shallow(x))]\n[<none> 255: ;return(shallow(x))]  -> [<return> -255]\n[<if> 254: ;if (is.null(irows))] n -> [<none> 256: ;return(.Call(CsubsetDT, x, irows, seq_along(x)))]\n[<if> 253: ;if (!length(leftcols))] n -> [<none> 257: ;jisvars = names_i\\[-leftcols\\];tt = jisvars %chin% names_x]\n[<none> 257: ;jisvars = names_i\\[-leftcols\\];tt = jisvars %chin% names_x]  -> [<if> 258: ;if (length(tt))]\n[<if> 258: ;if (length(tt))] y -> [<none> 259: ;jisvars\\[tt\\] = paste0(\"i.\", jisvars\\[tt\\])]\n[<none> 259: ;jisvars\\[tt\\] = paste0(\"i.\", jisvars\\[tt\\])]  -> [<end> -258]\n[<if> 258: ;if (length(tt))] n -> [<end> -258]\n[<end> -258]  -> [<if> 260: ;if (length(duprightcols <- rightcols\\[duplicated(rightcols)\\]))]\n[<if> 260: ;if (length(duprightcols <- rightcols\\[duplicated(rightcols)\\]))] y -> [<none> 261: ;nx = c(names_x, names_x\\[duprightcols\\]);rightcols = chmatchdup(names_x\\[rightcols\\], nx);nx = make.unique(nx)]\n[<none> 261: ;nx = c(names_x, names_x\\[duprightcols\\]);rightcols = chmatchdup(names_x\\[rightcols\\], nx);nx = make.unique(nx)]  -> [<end> -260]\n[<if> 260: ;if (length(duprightcols <- rightcols\\[duplicated(rightcols)\\]))] n -> [<none> 262: ;nx = names_x]\n[<none> 262: ;nx = names_x]  -> [<end> -260]\n[<end> -260]  -> [<none> 263: ;ansvars = make.unique(c(nx, jisvars));icols = c(leftcols, seq_along(i)\\[-leftcols\\]);icolsAns = c(rightcols, seq.int(length(nx) + 1L, length.out = ncol(i) - ;    length(unique(leftcols))));xcols = xcolsAns = seq_along(x)\\[-rightcols\\]]\n[<none> 263: ;ansvars = make.unique(c(nx, jisvars));icols = c(leftcols, seq_along(i)\\[-leftcols\\]);icolsAns = c(rightcols, seq.int(length(nx) + 1L, length.out = ncol(i) - ;    length(unique(leftcols))));xcols = xcolsAns = seq_along(x)\\[-rightcols\\]]  -> [<end> -253]\n[<end> -253]  -> [<none> 264: ;ansvals = chmatch(ansvars, nx)]\n[<none> 264: ;ansvals = chmatch(ansvars, nx)]  -> [<end> -250]\n[<if> 250: ;if (missing(j))] n -> [<if> 265: ;if (is.data.table(i))]\n[<if> 265: ;if (is.data.table(i))] y -> [<none> 266: ;idotprefix = paste0(\"i.\", names_i);xdotprefix = paste0(\"x.\", names_x)]\n[<none> 266: ;idotprefix = paste0(\"i.\", names_i);xdotprefix = paste0(\"x.\", names_x)]  -> [<end> -265]\n[<if> 265: ;if (is.data.table(i))] n -> [<none> 267: ;idotprefix = xdotprefix = character(0L)]\n[<none> 267: ;idotprefix = xdotprefix = character(0L)]  -> [<end> -265]\n[<end> -265]  -> [<if> 268: ;if (is.null(jsub))]\n[<if> 268: ;if (is.null(jsub))] y -> [<none> 269: ;return(NULL)]\n[<none> 269: ;return(NULL)]  -> [<return> -269]\n[<if> 268: ;if (is.null(jsub))] n -> [<end> -268]\n[<end> -268]  -> [<if> 270: ;if (!with && is.call(jsub) && jsub\\[\\[1L\\]\\] == \":=\")]\n[<if> 270: ;if (!with && is.call(jsub) && jsub\\[\\[1L\\]\\] == \":=\")] y -> [<if> 271: ;if (is.null(names(jsub)) && is.name(jsub\\[\\[2L\\]\\]))]\n[<if> 271: ;if (is.null(names(jsub)) && is.name(jsub\\[\\[2L\\]\\]))] y -> [<none> 272: ;warning(\"with=FALSE together with := was deprecated in v1.9.4 released Oct 2014. Please wrap the LHS of := with parentheses; e.g., DT\\[,(myVar):=sum(b),by=a\\] to assign to column name(s) held in variable myVar. See ?':=' for other examples. As warned in 2014, this is now a warning.\");jsub\\[\\[2L\\]\\] = eval(jsub\\[\\[2L\\]\\], parent.frame(), parent.frame())]\n[<none> 272: ;warning(\"with=FALSE together with := was deprecated in v1.9.4 released Oct 2014. Please wrap the LHS of := with parentheses; e.g., DT\\[,(myVar):=sum(b),by=a\\] to assign to column name(s) held in variable myVar. See ?':=' for other examples. As warned in 2014, this is now a warning.\");jsub\\[\\[2L\\]\\] = eval(jsub\\[\\[2L\\]\\], parent.frame(), parent.frame())]  -> [<end> -271]\n[<if> 271: ;if (is.null(names(jsub)) && is.name(jsub\\[\\[2L\\]\\]))] n -> [<none> 273: ;warning(\"with=FALSE ignored, it isn't needed when using :=. See ?':=' for examples.\")]\n[<none> 273: ;warning(\"with=FALSE ignored, it isn't needed when using :=. See ?':=' for examples.\")]  -> [<end> -271]\n[<end> -271]  -> [<none> 274: ;with = TRUE]\n[<none> 274: ;with = TRUE]  -> [<end> -270]\n[<if> 270: ;if (!with && is.call(jsub) && jsub\\[\\[1L\\]\\] == \":=\")] n -> [<end> -270]\n[<end> -270]  -> [<if> 275: ;if (!with)]\n[<if> 275: ;if (!with)] y -> [<if> 276: ;if (is.call(jsub) && length(jsub) == 2L && as.character(jsub\\[\\[1L\\]\\]) %chin% \n    c(\"!\", \"-\"))]\n[<if> 276: ;if (is.call(jsub) && length(jsub) == 2L && as.character(jsub\\[\\[1L\\]\\]) %chin% \n    c(\"!\", \"-\"))] y -> [<none> 277: ;notj = TRUE;jsub = jsub\\[\\[2L\\]\\]]\n[<none> 277: ;notj = TRUE;jsub = jsub\\[\\[2L\\]\\]]  -> [<end> -276]\n[<if> 276: ;if (is.call(jsub) && length(jsub) == 2L && as.character(jsub\\[\\[1L\\]\\]) %chin% \n    c(\"!\", \"-\"))] n -> [<none> 278: ;notj = FALSE]\n[<none> 278: ;notj = FALSE]  -> [<end> -276]\n[<end> -276]  -> [<while> 279: ;while (is.call(jsub) && jsub\\[\\[1L\\]\\] == \"(\")]\n[<while> 279: ;while (is.call(jsub) && jsub\\[\\[1L\\]\\] == \"(\")]  -> [<none> 280: ;jsub = as.list(jsub)\\[\\[-1L\\]\\]]\n[<none> 280: ;jsub = as.list(jsub)\\[\\[-1L\\]\\]]  -> [<start> -279]\n[<while> 279: ;while (is.call(jsub) && jsub\\[\\[1L\\]\\] == \"(\")] next <- [<start> -279]\n[<start> -279]  -> [<if> 281: ;if (is.call(jsub) && length(jsub) == 3L && jsub\\[\\[1L\\]\\] == \":\")]\n[<if> 281: ;if (is.call(jsub) && length(jsub) == 3L && jsub\\[\\[1L\\]\\] == \":\")] y -> [<none> 282: ;j = eval(jsub, setattr(as.list(seq_along(x)), \"names\", names_x), ;    parent.frame())]\n[<none> 282: ;j = eval(jsub, setattr(as.list(seq_along(x)), \"names\", names_x), ;    parent.frame())]  -> [<end> -281]\n[<if> 281: ;if (is.call(jsub) && length(jsub) == 3L && jsub\\[\\[1L\\]\\] == \":\")] n -> [<none> 283: ;names(..syms) = ..syms;j = eval(jsub, lapply(substring(..syms, 3L), get, pos = parent.frame()), ;    parent.frame())]\n[<none> 283: ;names(..syms) = ..syms;j = eval(jsub, lapply(substring(..syms, 3L), get, pos = parent.frame()), ;    parent.frame())]  -> [<end> -281]\n[<end> -281]  -> [<if> 284: ;if (is.logical(j))]\n[<if> 284: ;if (is.logical(j))] y -> [<none> 285: ;j <- which(j)]\n[<none> 285: ;j <- which(j)]  -> [<end> -284]\n[<if> 284: ;if (is.logical(j))] n -> [<end> -284]\n[<end> -284]  -> [<if> 286: ;if (!length(j) && !notj)]\n[<if> 286: ;if (!length(j) && !notj)] y -> [<none> 287: ;return(null.data.table())]\n[<none> 287: ;return(null.data.table())]  -> [<return> -287]\n[<if> 286: ;if (!length(j) && !notj)] n -> [<end> -286]\n[<end> -286]  -> [<if> 288: ;if (is.factor(j))]\n[<if> 288: ;if (is.factor(j))] y -> [<none> 289: ;j = as.character(j)]\n[<none> 289: ;j = as.character(j)]  -> [<end> -288]\n[<if> 288: ;if (is.factor(j))] n -> [<end> -288]\n[<end> -288]  -> [<if> 290: ;if (is.character(j))]\n[<if> 290: ;if (is.character(j))] y -> [<if> 291: ;if (notj)]\n[<if> 291: ;if (notj)] y -> [<if> 292: ;if (anyNA(idx <- chmatch(j, names_x)))]\n[<if> 292: ;if (anyNA(idx <- chmatch(j, names_x)))] y -> [<none> 293: ;warning(\"column(s) not removed because not found: \", brackify(j\\[is.na(idx)\\]))]\n[<none> 293: ;warning(\"column(s) not removed because not found: \", brackify(j\\[is.na(idx)\\]))]  -> [<end> -292]\n[<if> 292: ;if (anyNA(idx <- chmatch(j, names_x)))] n -> [<end> -292]\n[<end> -292]  -> [<none> 294: ;w = !names_x %chin% j;ansvars = names_x\\[w\\];ansvals = which(w)]\n[<none> 294: ;w = !names_x %chin% j;ansvars = names_x\\[w\\];ansvals = which(w)]  -> [<end> -291]\n[<if> 291: ;if (notj)] n -> [<none> 295: ;ansvars = j;ansvals = chmatch(ansvars, names_x)]\n[<none> 295: ;ansvars = j;ansvals = chmatch(ansvars, names_x)]  -> [<end> -291]\n[<end> -291]  -> [<if> 296: ;if (!length(ansvals))]\n[<if> 296: ;if (!length(ansvals))] y -> [<none> 297: ;return(null.data.table())]\n[<none> 297: ;return(null.data.table())]  -> [<return> -297]\n[<if> 296: ;if (!length(ansvals))] n -> [<end> -296]\n[<end> -296]  -> [<if> 298: ;if (!length(leftcols))]\n[<if> 298: ;if (!length(leftcols))] y -> [<if> 299: ;if (!anyNA(ansvals))]\n[<if> 299: ;if (!anyNA(ansvals))] y -> [<none> 300: ;return(.Call(CsubsetDT, x, irows, ansvals))]\n[<none> 300: ;return(.Call(CsubsetDT, x, irows, ansvals))]  -> [<return> -300]\n[<if> 299: ;if (!anyNA(ansvals))] n -> [<none> 301: ;stop(\"column(s) not found: \", paste(ansvars\\[is.na(ansvals)\\], ;    collapse = \", \"))]\n[<if> 298: ;if (!length(leftcols))] n -> [<end> -298]\n[<end> -298]  -> [<end> -290]\n[<if> 290: ;if (is.character(j))] n -> [<if> 302: ;if (is.numeric(j))]\n[<if> 302: ;if (is.numeric(j))] y -> [<none> 303: ;j = as.integer(j)]\n[<none> 303: ;j = as.integer(j)]  -> [<if> 304: ;if (any(w <- (j > ncol(x))))]\n[<if> 304: ;if (any(w <- (j > ncol(x))))] y -> [<none> 305: ;stop(\"Item \", which.first(w), \" of j is \", j\\[which.first(w)\\], ;    \" which is outside the column number range \\[1,ncol=\", ncol(x), ;    \"\\]\")]\n[<none> 305: ;stop(\"Item \", which.first(w), \" of j is \", j\\[which.first(w)\\], ;    \" which is outside the column number range \\[1,ncol=\", ncol(x), ;    \"\\]\")]  -> [<stop> -305]\n[<if> 304: ;if (any(w <- (j > ncol(x))))] n -> [<end> -304]\n[<end> -304]  -> [<none> 306: ;j = j\\[j != 0L\\]]\n[<none> 306: ;j = j\\[j != 0L\\]]  -> [<if> 307: ;if (any(j < 0L))]\n[<if> 307: ;if (any(j < 0L))] y -> [<if> 308: ;if (any(j > 0L))]\n[<if> 308: ;if (any(j > 0L))] y -> [<none> 309: ;stop(\"j mixes positives and negatives\")]\n[<none> 309: ;stop(\"j mixes positives and negatives\")]  -> [<stop> -309]\n[<if> 308: ;if (any(j > 0L))] n -> [<end> -308]\n[<end> -308]  -> [<none> 310: ;j = seq_along(x)\\[j\\]]\n[<none> 310: ;j = seq_along(x)\\[j\\]]  -> [<end> -307]\n[<if> 307: ;if (any(j < 0L))] n -> [<end> -307]\n[<end> -307]  -> [<if> 311: ;if (notj)]\n[<if> 311: ;if (notj)] y -> [<none> 312: ;j = seq_along(x)\\[if (length(j)) -j else TRUE\\]]\n[<none> 312: ;j = seq_along(x)\\[if (length(j)) -j else TRUE\\]]  -> [<end> -311]\n[<if> 311: ;if (notj)] n -> [<end> -311]\n[<end> -311]  -> [<if> 313: ;if (!length(j))]\n[<if> 313: ;if (!length(j))] y -> [<none> 314: ;return(null.data.table())]\n[<none> 314: ;return(null.data.table())]  -> [<return> -314]\n[<if> 313: ;if (!length(j))] n -> [<end> -313]\n[<end> -313]  -> [<none> 315: ;return(.Call(CsubsetDT, x, irows, j))]\n[<none> 315: ;return(.Call(CsubsetDT, x, irows, j))]  -> [<return> -315]\n[<if> 302: ;if (is.numeric(j))] n -> [<none> 316: ;stop(\"When with=FALSE, j-argument should be of type logical/character/integer indicating the columns to select.\")]\n[<end> -290]  -> [<end> -275]\n[<if> 275: ;if (!with)] n -> [<none> 317: ;bynames = NULL;allbyvars = NULL]\n[<none> 317: ;bynames = NULL;allbyvars = NULL]  -> [<if> 318: ;if (byjoin)]\n[<if> 318: ;if (byjoin)] y -> [<none> 319: ;bynames = names_x\\[rightcols\\]]\n[<none> 319: ;bynames = names_x\\[rightcols\\]]  -> [<end> -318]\n[<if> 318: ;if (byjoin)] n -> [<if> 320: ;if (!missingby)]\n[<if> 320: ;if (!missingby)] y -> [<none> 321: ;bysubl = as.list.default(bysub);bysuborig = bysub]\n[<none> 321: ;bysubl = as.list.default(bysub);bysuborig = bysub]  -> [<if> 322: ;if (is.name(bysub) && !(as.character(bysub) %chin% names_x))]\n[<if> 322: ;if (is.name(bysub) && !(as.character(bysub) %chin% names_x))] y -> [<none> 323: ;bysub = eval(bysub, parent.frame(), parent.frame())]\n[<none> 323: ;bysub = eval(bysub, parent.frame(), parent.frame())]  -> [<if> 324: ;if (is.atomic(bysub))]\n[<if> 324: ;if (is.atomic(bysub))] y -> [<none> 325: ;bysubl = list(bysuborig)]\n[<none> 325: ;bysubl = list(bysuborig)]  -> [<end> -324]\n[<if> 324: ;if (is.atomic(bysub))] n -> [<none> 326: ;bysubl = as.list.default(bysub)]\n[<none> 326: ;bysubl = as.list.default(bysub)]  -> [<end> -324]\n[<end> -324]  -> [<end> -322]\n[<if> 322: ;if (is.name(bysub) && !(as.character(bysub) %chin% names_x))] n -> [<end> -322]\n[<end> -322]  -> [<if> 327: ;if (length(bysubl) && identical(bysubl\\[\\[1L\\]\\], quote(eval)))]\n[<if> 327: ;if (length(bysubl) && identical(bysubl\\[\\[1L\\]\\], quote(eval)))] y -> [<none> 328: ;bysub = eval(bysubl\\[\\[2L\\]\\], parent.frame(), parent.frame());bysub = replace_dot_alias(bysub)]\n[<none> 328: ;bysub = eval(bysubl\\[\\[2L\\]\\], parent.frame(), parent.frame());bysub = replace_dot_alias(bysub)]  -> [<if> 329: ;if (is.expression(bysub))]\n[<if> 329: ;if (is.expression(bysub))] y -> [<none> 330: ;bysub = bysub\\[\\[1L\\]\\]]\n[<none> 330: ;bysub = bysub\\[\\[1L\\]\\]]  -> [<end> -329]\n[<if> 329: ;if (is.expression(bysub))] n -> [<end> -329]\n[<end> -329]  -> [<none> 331: ;bysubl = as.list.default(bysub)]\n[<none> 331: ;bysubl = as.list.default(bysub)]  -> [<end> -327]\n[<if> 327: ;if (length(bysubl) && identical(bysubl\\[\\[1L\\]\\], quote(eval)))] n -> [<if> 332: ;if (is.call(bysub) && as.character(bysub\\[\\[1L\\]\\]) %chin% c(\"c\", \n    \"key\", \"names\", \"intersect\", \"setdiff\"))]\n[<if> 332: ;if (is.call(bysub) && as.character(bysub\\[\\[1L\\]\\]) %chin% c(\"c\", \n    \"key\", \"names\", \"intersect\", \"setdiff\"))] y -> [<none> 333: ;tt = eval(bysub, parent.frame(), parent.frame())]\n[<none> 333: ;tt = eval(bysub, parent.frame(), parent.frame())]  -> [<if> 334: ;if (!is.character(tt))]\n[<if> 334: ;if (!is.character(tt))] y -> [<none> 335: ;stop(\"by=c(...), key(...) or names(...) must evaluate to 'character'\")]\n[<none> 335: ;stop(\"by=c(...), key(...) or names(...) must evaluate to 'character'\")]  -> [<stop> -335]\n[<if> 334: ;if (!is.character(tt))] n -> [<end> -334]\n[<end> -334]  -> [<none> 336: ;bysub = tt]\n[<none> 336: ;bysub = tt]  -> [<end> -332]\n[<if> 332: ;if (is.call(bysub) && as.character(bysub\\[\\[1L\\]\\]) %chin% c(\"c\", \n    \"key\", \"names\", \"intersect\", \"setdiff\"))] n -> [<if> 337: ;if (is.call(bysub) && !as.character(bysub\\[\\[1L\\]\\]) %chin% c(\"list\", \n    \"as.list\", \"{\", \".\", \":\"))]\n[<if> 337: ;if (is.call(bysub) && !as.character(bysub\\[\\[1L\\]\\]) %chin% c(\"list\", \n    \"as.list\", \"{\", \".\", \":\"))] y -> [<none> 338: ;bysub = as.call(c(as.name(\"(\"), list(bysub)));bysubl = as.list.default(bysub)]\n[<none> 338: ;bysub = as.call(c(as.name(\"(\"), list(bysub)));bysubl = as.list.default(bysub)]  -> [<end> -337]\n[<if> 337: ;if (is.call(bysub) && !as.character(bysub\\[\\[1L\\]\\]) %chin% c(\"list\", \n    \"as.list\", \"{\", \".\", \":\"))] n -> [<if> 339: ;if (is.call(bysub) && bysub\\[\\[1L\\]\\] == \".\")]\n[<if> 339: ;if (is.call(bysub) && bysub\\[\\[1L\\]\\] == \".\")] y -> [<none> 340: ;bysub\\[\\[1L\\]\\] = quote(list)]\n[<none> 340: ;bysub\\[\\[1L\\]\\] = quote(list)]  -> [<end> -339]\n[<if> 339: ;if (is.call(bysub) && bysub\\[\\[1L\\]\\] == \".\")] n -> [<end> -339]\n[<end> -339]  -> [<end> -337]\n[<end> -337]  -> [<end> -332]\n[<end> -332]  -> [<end> -327]\n[<end> -327]  -> [<if> 341: ;if (mode(bysub) == \"character\")]\n[<if> 341: ;if (mode(bysub) == \"character\")] y -> [<if> 342: ;if (length(grep(\",\", bysub, fixed = TRUE)))]\n[<if> 342: ;if (length(grep(\",\", bysub, fixed = TRUE)))] y -> [<if> 343: ;if (length(bysub) > 1L)]\n[<if> 343: ;if (length(bysub) > 1L)] y -> [<none> 344: ;stop(\"'by' is a character vector length \", length(bysub), \" but one or more items include a comma. Either pass a vector of column names (which can contain spaces, but no commas), or pass a vector length 1 containing comma separated column names. See ?data.table for other possibilities.\")]\n[<none> 344: ;stop(\"'by' is a character vector length \", length(bysub), \" but one or more items include a comma. Either pass a vector of column names (which can contain spaces, but no commas), or pass a vector length 1 containing comma separated column names. See ?data.table for other possibilities.\")]  -> [<stop> -344]\n[<if> 343: ;if (length(bysub) > 1L)] n -> [<end> -343]\n[<end> -343]  -> [<none> 345: ;bysub = strsplit(bysub, split = \",\")\\[\\[1L\\]\\]]\n[<none> 345: ;bysub = strsplit(bysub, split = \",\")\\[\\[1L\\]\\]]  -> [<end> -342]\n[<if> 342: ;if (length(grep(\",\", bysub, fixed = TRUE)))] n -> [<end> -342]\n[<end> -342]  -> [<none> 346: ;backtick_idx = grep(\"^\\[^`\\]+$\", bysub)]\n[<none> 346: ;backtick_idx = grep(\"^\\[^`\\]+$\", bysub)]  -> [<if> 347: ;if (length(backtick_idx))]\n[<if> 347: ;if (length(backtick_idx))] y -> [<none> 348: ;bysub\\[backtick_idx\\] = paste0(\"`\", bysub\\[backtick_idx\\], \"`\")]\n[<none> 348: ;bysub\\[backtick_idx\\] = paste0(\"`\", bysub\\[backtick_idx\\], \"`\")]  -> [<end> -347]\n[<if> 347: ;if (length(backtick_idx))] n -> [<end> -347]\n[<end> -347]  -> [<none> 349: ;backslash_idx = grep(\"\\\\\", bysub, fixed = TRUE)]\n[<none> 349: ;backslash_idx = grep(\"\\\\\", bysub, fixed = TRUE)]  -> [<if> 350: ;if (length(backslash_idx))]\n[<if> 350: ;if (length(backslash_idx))] y -> [<none> 351: ;bysub\\[backslash_idx\\] = gsub(\"\\\\\", \"\\\\\\\\\", bysub\\[backslash_idx\\], ;    fixed = TRUE)]\n[<none> 351: ;bysub\\[backslash_idx\\] = gsub(\"\\\\\", \"\\\\\\\\\", bysub\\[backslash_idx\\], ;    fixed = TRUE)]  -> [<end> -350]\n[<if> 350: ;if (length(backslash_idx))] n -> [<end> -350]\n[<end> -350]  -> [<none> 352: ;bysub = parse(text = paste0(\"list(\", paste(bysub, collapse = \",\"), ;    \")\"))\\[\\[1L\\]\\];bysubl = as.list.default(bysub)]\n[<none> 352: ;bysub = parse(text = paste0(\"list(\", paste(bysub, collapse = \",\"), ;    \")\"))\\[\\[1L\\]\\];bysubl = as.list.default(bysub)]  -> [<end> -341]\n[<if> 341: ;if (mode(bysub) == \"character\")] n -> [<end> -341]\n[<end> -341]  -> [<none> 353: ;allbyvars = intersect(all.vars(bysub), names_x);orderedirows = .Call(CisOrderedSubset, irows, nrow(x));bysameorder = byindex = FALSE]\n[<none> 353: ;allbyvars = intersect(all.vars(bysub), names_x);orderedirows = .Call(CisOrderedSubset, irows, nrow(x));bysameorder = byindex = FALSE]  -> [<if> 354: ;if (all(vapply_1b(bysubl, is.name)))]\n[<if> 354: ;if (all(vapply_1b(bysubl, is.name)))] y -> [<none> 355: ;bysameorder = orderedirows && haskey(x) && length(allbyvars) && ;    identical(allbyvars, head(key(x), length(allbyvars)))]\n[<none> 355: ;bysameorder = orderedirows && haskey(x) && length(allbyvars) && ;    identical(allbyvars, head(key(x), length(allbyvars)))]  -> [<if> 356: ;if (!bysameorder && keyby && !length(irows) && isTRUE(getOption(\"datatable.use.index\")))]\n[<if> 356: ;if (!bysameorder && keyby && !length(irows) && isTRUE(getOption(\"datatable.use.index\")))] y -> [<none> 357: ;tt = paste0(c(allbyvars, \"\"), collapse = \"__\");w = which.first(substring(paste0(indices(x), \"__\"), 1L, nchar(tt)) == ;    tt)]\n[<none> 357: ;tt = paste0(c(allbyvars, \"\"), collapse = \"__\");w = which.first(substring(paste0(indices(x), \"__\"), 1L, nchar(tt)) == ;    tt)]  -> [<if> 358: ;if (!is.na(w))]\n[<if> 358: ;if (!is.na(w))] y -> [<none> 359: ;byindex = indices(x)\\[w\\]]\n[<none> 359: ;byindex = indices(x)\\[w\\]]  -> [<if> 360: ;if (!length(getindex(x, byindex)))]\n[<if> 360: ;if (!length(getindex(x, byindex)))] y -> [<if> 361: ;if (verbose)]\n[<if> 361: ;if (verbose)] y -> [<none> 362: ;cat(\"by index '\", byindex, \"' but that index has 0 length. Ignoring.\\n\", ;    sep = \"\")]\n[<none> 362: ;cat(\"by index '\", byindex, \"' but that index has 0 length. Ignoring.\\n\", ;    sep = \"\")]  -> [<end> -361]\n[<if> 361: ;if (verbose)] n -> [<end> -361]\n[<end> -361]  -> [<none> 363: ;byindex = FALSE]\n[<none> 363: ;byindex = FALSE]  -> [<end> -360]\n[<if> 360: ;if (!length(getindex(x, byindex)))] n -> [<end> -360]\n[<end> -360]  -> [<end> -358]\n[<if> 358: ;if (!is.na(w))] n -> [<end> -358]\n[<end> -358]  -> [<end> -356]\n[<if> 356: ;if (!bysameorder && keyby && !length(irows) && isTRUE(getOption(\"datatable.use.index\")))] n -> [<end> -356]\n[<end> -356]  -> [<end> -354]\n[<if> 354: ;if (all(vapply_1b(bysubl, is.name)))] n -> [<end> -354]\n[<end> -354]  -> [<if> 364: ;if (is.null(irows))]\n[<if> 364: ;if (is.null(irows))] y -> [<if> 365: ;if (is.call(bysub) && length(bysub) == 3L && bysub\\[\\[1L\\]\\] == \":\" && \n    is.name(bysub\\[\\[2L\\]\\]) && is.name(bysub\\[\\[3L\\]\\]))]\n[<if> 365: ;if (is.call(bysub) && length(bysub) == 3L && bysub\\[\\[1L\\]\\] == \":\" && \n    is.name(bysub\\[\\[2L\\]\\]) && is.name(bysub\\[\\[3L\\]\\]))] y -> [<none> 366: ;byval = eval(bysub, setattr(as.list(seq_along(x)), \"names\", names_x), ;    parent.frame());byval = as.list(x)\\[byval\\]]\n[<none> 366: ;byval = eval(bysub, setattr(as.list(seq_along(x)), \"names\", names_x), ;    parent.frame());byval = as.list(x)\\[byval\\]]  -> [<end> -365]\n[<if> 365: ;if (is.call(bysub) && length(bysub) == 3L && bysub\\[\\[1L\\]\\] == \":\" && \n    is.name(bysub\\[\\[2L\\]\\]) && is.name(bysub\\[\\[3L\\]\\]))] n -> [<none> 367: ;byval = eval(bysub, x, parent.frame())]\n[<none> 367: ;byval = eval(bysub, x, parent.frame())]  -> [<end> -365]\n[<end> -365]  -> [<end> -364]\n[<if> 364: ;if (is.null(irows))] n -> [<if> 368: ;if (!is.integer(irows))]\n[<if> 368: ;if (!is.integer(irows))] y -> [<none> 369: ;stop(\"Internal error: irows isn't integer\")]\n[<none> 369: ;stop(\"Internal error: irows isn't integer\")]  -> [<stop> -369]\n[<if> 368: ;if (!is.integer(irows))] n -> [<end> -368]\n[<end> -368]  -> [<if> 370: ;if (!is.na(nomatch))]\n[<if> 370: ;if (!is.na(nomatch))] y -> [<none> 371: ;irows = irows\\[irows != 0L\\]]\n[<none> 371: ;irows = irows\\[irows != 0L\\]]  -> [<end> -370]\n[<if> 370: ;if (!is.na(nomatch))] n -> [<end> -370]\n[<end> -370]  -> [<if> 372: ;if (length(allbyvars))]\n[<if> 372: ;if (length(allbyvars))] y -> [<if> 373: ;if (verbose)]\n[<if> 373: ;if (verbose)] y -> [<none> 374: ;cat(\"i clause present and columns used in by detected, only these subset:\", ;    paste(allbyvars, collapse = \",\"), \"\\n\")]\n[<none> 374: ;cat(\"i clause present and columns used in by detected, only these subset:\", ;    paste(allbyvars, collapse = \",\"), \"\\n\")]  -> [<end> -373]\n[<if> 373: ;if (verbose)] n -> [<end> -373]\n[<end> -373]  -> [<none> 375: ;xss = x\\[irows, allbyvars, with = FALSE, nomatch = nomatch, mult = mult, ;    roll = roll, rollends = rollends\\]]\n[<none> 375: ;xss = x\\[irows, allbyvars, with = FALSE, nomatch = nomatch, mult = mult, ;    roll = roll, rollends = rollends\\]]  -> [<end> -372]\n[<if> 372: ;if (length(allbyvars))] n -> [<if> 376: ;if (verbose)]\n[<if> 376: ;if (verbose)] y -> [<none> 377: ;cat(\"i clause present but columns used in by not detected. Having to subset all columns before evaluating 'by': '\", ;    deparse(by), \"'\\n\", sep = \"\")]\n[<none> 377: ;cat(\"i clause present but columns used in by not detected. Having to subset all columns before evaluating 'by': '\", ;    deparse(by), \"'\\n\", sep = \"\")]  -> [<end> -376]\n[<if> 376: ;if (verbose)] n -> [<end> -376]\n[<end> -376]  -> [<none> 378: ;xss = x\\[irows, nomatch = nomatch, mult = mult, roll = roll, rollends = rollends\\]]\n[<none> 378: ;xss = x\\[irows, nomatch = nomatch, mult = mult, roll = roll, rollends = rollends\\]]  -> [<end> -372]\n[<end> -372]  -> [<if> 379: ;if (is.call(bysub) && length(bysub) == 3L && bysub\\[\\[1L\\]\\] == \":\")]\n[<if> 379: ;if (is.call(bysub) && length(bysub) == 3L && bysub\\[\\[1L\\]\\] == \":\")] y -> [<none> 380: ;byval = eval(bysub, setattr(as.list(seq_along(xss)), \"names\", ;    names(xss)), parent.frame());byval = as.list(xss)\\[byval\\]]\n[<none> 380: ;byval = eval(bysub, setattr(as.list(seq_along(xss)), \"names\", ;    names(xss)), parent.frame());byval = as.list(xss)\\[byval\\]]  -> [<end> -379]\n[<if> 379: ;if (is.call(bysub) && length(bysub) == 3L && bysub\\[\\[1L\\]\\] == \":\")] n -> [<none> 381: ;byval = eval(bysub, xss, parent.frame())]\n[<none> 381: ;byval = eval(bysub, xss, parent.frame())]  -> [<end> -379]\n[<end> -379]  -> [<none> 382: ;xnrow = nrow(xss)]\n[<none> 382: ;xnrow = nrow(xss)]  -> [<end> -364]\n[<end> -364]  -> [<if> 383: ;if (!length(byval) && xnrow > 0L)]\n[<if> 383: ;if (!length(byval) && xnrow > 0L)] y -> [<none> 384: ;bysameorder = FALSE;byval = list();bynames = allbyvars = NULL]\n[<none> 384: ;bysameorder = FALSE;byval = list();bynames = allbyvars = NULL]  -> [<end> -383]\n[<if> 383: ;if (!length(byval) && xnrow > 0L)] n -> [<none> 385: ;bynames = names(byval)]\n[<none> 385: ;bynames = names(byval)]  -> [<end> -383]\n[<end> -383]  -> [<if> 386: ;if (is.atomic(byval))]\n[<if> 386: ;if (is.atomic(byval))] y -> [<if> 387: ;if (is.character(byval) && length(byval) <= ncol(x) && !(is.name(bysub) && \n    as.character(bysub) %chin% names_x))]\n[<if> 387: ;if (is.character(byval) && length(byval) <= ncol(x) && !(is.name(bysub) && \n    as.character(bysub) %chin% names_x))] y -> [<none> 388: ;stop(\"'by' appears to evaluate to column names but isn't c() or key(). Use by=list(...) if you can. Otherwise, by=eval\", ;    deparse(bysub), \" should work. This is for efficiency so data.table can detect which columns are needed.\")]\n[<none> 388: ;stop(\"'by' appears to evaluate to column names but isn't c() or key(). Use by=list(...) if you can. Otherwise, by=eval\", ;    deparse(bysub), \" should work. This is for efficiency so data.table can detect which columns are needed.\")]  -> [<stop> -388]\n[<if> 387: ;if (is.character(byval) && length(byval) <= ncol(x) && !(is.name(bysub) && \n    as.character(bysub) %chin% names_x))] n -> [<none> 389: ;byval = list(byval);bysubl = c(as.name(\"list\"), bysuborig)]\n[<none> 389: ;byval = list(byval);bysubl = c(as.name(\"list\"), bysuborig)]  -> [<if> 390: ;if (is.name(bysuborig))]\n[<if> 390: ;if (is.name(bysuborig))] y -> [<none> 391: ;bynames = as.character(bysuborig)]\n[<none> 391: ;bynames = as.character(bysuborig)]  -> [<end> -390]\n[<if> 390: ;if (is.name(bysuborig))] n -> [<none> 392: ;bynames = names(byval)]\n[<none> 392: ;bynames = names(byval)]  -> [<end> -390]\n[<end> -390]  -> [<end> -387]\n[<end> -387]  -> [<end> -386]\n[<if> 386: ;if (is.atomic(byval))] n -> [<end> -386]\n[<end> -386]  -> [<if> 393: ;if (!is.list(byval))]\n[<if> 393: ;if (!is.list(byval))] y -> [<none> 394: ;stop(\"'by' or 'keyby' must evaluate to a vector or a list of vectors (where 'list' includes data.table and data.frame which are lists, too)\")]\n[<none> 394: ;stop(\"'by' or 'keyby' must evaluate to a vector or a list of vectors (where 'list' includes data.table and data.frame which are lists, too)\")]  -> [<stop> -394]\n[<if> 393: ;if (!is.list(byval))] n -> [<end> -393]\n[<end> -393]  -> [<if> 395: ;if (length(byval) == 1L && is.null(byval\\[\\[1L\\]\\]))]\n[<if> 395: ;if (length(byval) == 1L && is.null(byval\\[\\[1L\\]\\]))] y -> [<none> 396: ;bynull = TRUE]\n[<none> 396: ;bynull = TRUE]  -> [<end> -395]\n[<if> 395: ;if (length(byval) == 1L && is.null(byval\\[\\[1L\\]\\]))] n -> [<end> -395]\n[<end> -395]  -> [<if> 397: ;if (!bynull)]\n[<if> 397: ;if (!bynull)] y -> [<for> 398: ;for (jj in seq_len(length(byval)))]\n[<for> 398: ;for (jj in seq_len(length(byval)))]  -> [<if> 399: ;if (!typeof(byval\\[\\[jj\\]\\]) %chin% ORDERING_TYPES)]\n[<if> 399: ;if (!typeof(byval\\[\\[jj\\]\\]) %chin% ORDERING_TYPES)] y -> [<none> 400: ;stop(\"column or expression \", jj, \" of 'by' or 'keyby' is type \", ;    typeof(byval\\[\\[jj\\]\\]), \". Do not quote column names. Usage: DT\\[,sum(colC),by=list(colA,month(colB))\\]\")]\n[<none> 400: ;stop(\"column or expression \", jj, \" of 'by' or 'keyby' is type \", ;    typeof(byval\\[\\[jj\\]\\]), \". Do not quote column names. Usage: DT\\[,sum(colC),by=list(colA,month(colB))\\]\")]  -> [<stop> -400]\n[<if> 399: ;if (!typeof(byval\\[\\[jj\\]\\]) %chin% ORDERING_TYPES)] n -> [<end> -399]\n[<end> -399]  -> [<start> -398]\n[<for> 398: ;for (jj in seq_len(length(byval)))] next <- [<start> -398]\n[<start> -398]  -> [<end> -397]\n[<if> 397: ;if (!bynull)] n -> [<end> -397]\n[<end> -397]  -> [<none> 401: ;tt = vapply_1i(byval, length)]\n[<none> 401: ;tt = vapply_1i(byval, length)]  -> [<if> 402: ;if (any(tt != xnrow))]\n[<if> 402: ;if (any(tt != xnrow))] y -> [<none> 403: ;stop(\"The items in the 'by' or 'keyby' list are length (\", paste(tt, ;    collapse = \",\"), \"). Each must be length \", xnrow, \"; the same length as there are rows in x (after subsetting if i is provided).\")]\n[<none> 403: ;stop(\"The items in the 'by' or 'keyby' list are length (\", paste(tt, ;    collapse = \",\"), \"). Each must be length \", xnrow, \"; the same length as there are rows in x (after subsetting if i is provided).\")]  -> [<stop> -403]\n[<if> 402: ;if (any(tt != xnrow))] n -> [<end> -402]\n[<end> -402]  -> [<if> 404: ;if (is.null(bynames))]\n[<if> 404: ;if (is.null(bynames))] y -> [<none> 405: ;bynames = rep.int(\"\", length(byval))]\n[<none> 405: ;bynames = rep.int(\"\", length(byval))]  -> [<end> -404]\n[<if> 404: ;if (is.null(bynames))] n -> [<end> -404]\n[<end> -404]  -> [<if> 406: ;if (length(idx <- which(!nzchar(bynames))) && !bynull)]\n[<if> 406: ;if (length(idx <- which(!nzchar(bynames))) && !bynull)] y -> [<if> 407: ;if (is.name(bysubl\\[\\[1L\\]\\]) && bysubl\\[\\[1L\\]\\] == \"{\")]\n[<if> 407: ;if (is.name(bysubl\\[\\[1L\\]\\]) && bysubl\\[\\[1L\\]\\] == \"{\")] y -> [<none> 408: ;bysubl = bysubl\\[\\[length(bysubl)\\]\\]]\n[<none> 408: ;bysubl = bysubl\\[\\[length(bysubl)\\]\\]]  -> [<end> -407]\n[<if> 407: ;if (is.name(bysubl\\[\\[1L\\]\\]) && bysubl\\[\\[1L\\]\\] == \"{\")] n -> [<end> -407]\n[<end> -407]  -> [<for> 409: ;for (jj in idx)]\n[<for> 409: ;for (jj in idx)]  -> [<none> 410: ;byvars = all.vars(bysubl\\[\\[jj + 1L\\]\\], functions = TRUE)]\n[<none> 410: ;byvars = all.vars(bysubl\\[\\[jj + 1L\\]\\], functions = TRUE)]  -> [<if> 411: ;if (length(byvars) == 1L)]\n[<if> 411: ;if (length(byvars) == 1L)] y -> [<none> 412: ;tt = byvars]\n[<none> 412: ;tt = byvars]  -> [<end> -411]\n[<if> 411: ;if (length(byvars) == 1L)] n -> [<none> 413: ;tt = grep(\"^eval$\\|^\\[^\\[:alpha:\\]. \\]\", byvars, invert = TRUE, value = TRUE);tt = if (length(tt)) tt\\[1L\\] else all.vars(bysubl\\[\\[jj + 1L\\]\\])\\[1L\\]]\n[<none> 413: ;tt = grep(\"^eval$\\|^\\[^\\[:alpha:\\]. \\]\", byvars, invert = TRUE, value = TRUE);tt = if (length(tt)) tt\\[1L\\] else all.vars(bysubl\\[\\[jj + 1L\\]\\])\\[1L\\]]  -> [<end> -411]\n[<end> -411]  -> [<if> 414: ;if (length(byvars) > 1L && tt %chin% all.vars(jsub, FALSE))]\n[<if> 414: ;if (length(byvars) > 1L && tt %chin% all.vars(jsub, FALSE))] y -> [<none> 415: ;bynames\\[jj\\] = deparse(bysubl\\[\\[jj + 1L\\]\\])]\n[<none> 415: ;bynames\\[jj\\] = deparse(bysubl\\[\\[jj + 1L\\]\\])]  -> [<if> 416: ;if (verbose)]\n[<if> 416: ;if (verbose)] y -> [<none> 417: ;cat(\"by-expression '\", bynames\\[jj\\], \"' is not named, and the auto-generated name '\", ;    tt, \"' clashed with variable(s) in j. Therefore assigning the entire by-expression as name.\\n\", ;    sep = \"\")]\n[<none> 417: ;cat(\"by-expression '\", bynames\\[jj\\], \"' is not named, and the auto-generated name '\", ;    tt, \"' clashed with variable(s) in j. Therefore assigning the entire by-expression as name.\\n\", ;    sep = \"\")]  -> [<end> -416]\n[<if> 416: ;if (verbose)] n -> [<end> -416]\n[<end> -416]  -> [<end> -414]\n[<if> 414: ;if (length(byvars) > 1L && tt %chin% all.vars(jsub, FALSE))] n -> [<none> 418: ;bynames\\[jj\\] = tt]\n[<none> 418: ;bynames\\[jj\\] = tt]  -> [<end> -414]\n[<end> -414]  -> [<start> -409]\n[<for> 409: ;for (jj in idx)] next <- [<start> -409]\n[<start> -409]  -> [<if> 419: ;if (any(duplicated(bynames)))]\n[<if> 419: ;if (any(duplicated(bynames)))] y -> [<none> 420: ;bynames = make.unique(bynames)]\n[<none> 420: ;bynames = make.unique(bynames)]  -> [<end> -419]\n[<if> 419: ;if (any(duplicated(bynames)))] n -> [<end> -419]\n[<end> -419]  -> [<end> -406]\n[<if> 406: ;if (length(idx <- which(!nzchar(bynames))) && !bynull)] n -> [<end> -406]\n[<end> -406]  -> [<none> 421: ;setattr(byval, \"names\", bynames)]\n[<none> 421: ;setattr(byval, \"names\", bynames)]  -> [<end> -320]\n[<if> 320: ;if (!missingby)] n -> [<end> -320]\n[<end> -320]  -> [<end> -318]\n[<end> -318]  -> [<none> 422: ;jvnames = NULL]\n[<none> 422: ;jvnames = NULL]  -> [<if> 423: ;if (is.name(jsub))]\n[<if> 423: ;if (is.name(jsub))] y -> [<if> 424: ;if (jsub != \".SD\")]\n[<if> 424: ;if (jsub != \".SD\")] y -> [<none> 425: ;jvnames = gsub(\"^\\[.\\](N\\|I\\|GRP\\|BY)$\", \"\\\\1\", as.character(jsub))]\n[<none> 425: ;jvnames = gsub(\"^\\[.\\](N\\|I\\|GRP\\|BY)$\", \"\\\\1\", as.character(jsub))]  -> [<end> -424]\n[<if> 424: ;if (jsub != \".SD\")] n -> [<end> -424]\n[<end> -424]  -> [<end> -423]\n[<if> 423: ;if (is.name(jsub))] n -> [<if> 426: ;if (is.call(jsub) && as.character(jsub\\[\\[1L\\]\\])\\[\\[1L\\]\\] %chin% c(\"list\", \n    \".\"))]\n[<if> 426: ;if (is.call(jsub) && as.character(jsub\\[\\[1L\\]\\])\\[\\[1L\\]\\] %chin% c(\"list\", \n    \".\"))] y -> [<none> 427: ;jsub\\[\\[1L\\]\\] = quote(list);jsubl = as.list.default(jsub)]\n[<none> 427: ;jsub\\[\\[1L\\]\\] = quote(list);jsubl = as.list.default(jsub)]  -> [<if> 428: ;if (length(jsubl) > 1L)]\n[<if> 428: ;if (length(jsubl) > 1L)] y -> [<none> 429: ;jvnames = names(jsubl)\\[-1L\\]]\n[<none> 429: ;jvnames = names(jsubl)\\[-1L\\]]  -> [<if> 430: ;if (is.null(jvnames))]\n[<if> 430: ;if (is.null(jvnames))] y -> [<none> 431: ;jvnames = rep.int(\"\", length(jsubl) - 1L)]\n[<none> 431: ;jvnames = rep.int(\"\", length(jsubl) - 1L)]  -> [<end> -430]\n[<if> 430: ;if (is.null(jvnames))] n -> [<end> -430]\n[<end> -430]  -> [<for> 432: ;for (jj in seq.int(2L, length(jsubl)))]\n[<for> 432: ;for (jj in seq.int(2L, length(jsubl)))]  -> [<if> 433: ;if (jvnames\\[jj - 1L\\] == \"\" && mode(jsubl\\[\\[jj\\]\\]) == \"name\")]\n[<if> 433: ;if (jvnames\\[jj - 1L\\] == \"\" && mode(jsubl\\[\\[jj\\]\\]) == \"name\")] y -> [<if> 434: ;if (jsubl\\[\\[jj\\]\\] == \"\")]\n[<if> 434: ;if (jsubl\\[\\[jj\\]\\] == \"\")] y -> [<none> 435: ;stop(\"Item \", jj - 1L, \" of the .() or list() passed to j is missing\")]\n[<none> 435: ;stop(\"Item \", jj - 1L, \" of the .() or list() passed to j is missing\")]  -> [<stop> -435]\n[<if> 434: ;if (jsubl\\[\\[jj\\]\\] == \"\")] n -> [<end> -434]\n[<end> -434]  -> [<none> 436: ;jvnames\\[jj - 1L\\] = gsub(\"^\\[.\\](N\\|I\\|GRP\\|BY)$\", \"\\\\1\", deparse(jsubl\\[\\[jj\\]\\]))]\n[<none> 436: ;jvnames\\[jj - 1L\\] = gsub(\"^\\[.\\](N\\|I\\|GRP\\|BY)$\", \"\\\\1\", deparse(jsubl\\[\\[jj\\]\\]))]  -> [<end> -433]\n[<if> 433: ;if (jvnames\\[jj - 1L\\] == \"\" && mode(jsubl\\[\\[jj\\]\\]) == \"name\")] n -> [<end> -433]\n[<end> -433]  -> [<start> -432]\n[<for> 432: ;for (jj in seq.int(2L, length(jsubl)))] next <- [<start> -432]\n[<start> -432]  -> [<none> 437: ;setattr(jsubl, \"names\", NULL);jsub = as.call(jsubl)]\n[<none> 437: ;setattr(jsubl, \"names\", NULL);jsub = as.call(jsubl)]  -> [<end> -428]\n[<if> 428: ;if (length(jsubl) > 1L)] n -> [<end> -428]\n[<end> -428]  -> [<end> -426]\n[<if> 426: ;if (is.call(jsub) && as.character(jsub\\[\\[1L\\]\\])\\[\\[1L\\]\\] %chin% c(\"list\", \n    \".\"))] n -> [<end> -426]\n[<end> -426]  -> [<end> -423]\n[<end> -423]  -> [<none> 438: ;av = all.vars(jsub, TRUE);use.I = \".I\" %chin% av]\n[<none> 438: ;av = all.vars(jsub, TRUE);use.I = \".I\" %chin% av]  -> [<if> 439: ;if (any(c(\".SD\", \"eval\", \"get\", \"mget\") %chin% av))]\n[<if> 439: ;if (any(c(\".SD\", \"eval\", \"get\", \"mget\") %chin% av))] y -> [<if> 440: ;if (missing(.SDcols))]\n[<if> 440: ;if (missing(.SDcols))] y -> [<none> 441: ;ansvars = sdvars = dupdiff(names_x, union(bynames, allbyvars));ansvals = chmatchdup(ansvars, names_x)]\n[<none> 441: ;ansvars = sdvars = dupdiff(names_x, union(bynames, allbyvars));ansvals = chmatchdup(ansvars, names_x)]  -> [<end> -440]\n[<if> 440: ;if (missing(.SDcols))] n -> [<none> 442: ;colsub = substitute(.SDcols)]\n[<none> 442: ;colsub = substitute(.SDcols)]  -> [<if> 443: ;if (is.call(colsub) && deparse(colsub\\[\\[1L\\]\\], 500L, backtick = FALSE) %chin% \n    c(\"!\", \"-\"))]\n[<if> 443: ;if (is.call(colsub) && deparse(colsub\\[\\[1L\\]\\], 500L, backtick = FALSE) %chin% \n    c(\"!\", \"-\"))] y -> [<none> 444: ;negate_sdcols = TRUE;colsub = colsub\\[\\[2L\\]\\]]\n[<none> 444: ;negate_sdcols = TRUE;colsub = colsub\\[\\[2L\\]\\]]  -> [<end> -443]\n[<if> 443: ;if (is.call(colsub) && deparse(colsub\\[\\[1L\\]\\], 500L, backtick = FALSE) %chin% \n    c(\"!\", \"-\"))] n -> [<none> 445: ;negate_sdcols = FALSE]\n[<none> 445: ;negate_sdcols = FALSE]  -> [<end> -443]\n[<end> -443]  -> [<while> 446: ;while (is.call(colsub) && colsub\\[\\[1L\\]\\] == \"(\")]\n[<while> 446: ;while (is.call(colsub) && colsub\\[\\[1L\\]\\] == \"(\")]  -> [<none> 447: ;colsub = as.list(colsub)\\[\\[-1L\\]\\]]\n[<none> 447: ;colsub = as.list(colsub)\\[\\[-1L\\]\\]]  -> [<start> -446]\n[<while> 446: ;while (is.call(colsub) && colsub\\[\\[1L\\]\\] == \"(\")] next <- [<start> -446]\n[<start> -446]  -> [<if> 448: ;if (is.call(colsub) && length(colsub) == 3L && colsub\\[\\[1L\\]\\] == \n    \":\")]\n[<if> 448: ;if (is.call(colsub) && length(colsub) == 3L && colsub\\[\\[1L\\]\\] == \n    \":\")] y -> [<none> 449: ;.SDcols = eval(colsub, setattr(as.list(seq_along(x)), \"names\", ;    names_x), parent.frame())]\n[<none> 449: ;.SDcols = eval(colsub, setattr(as.list(seq_along(x)), \"names\", ;    names_x), parent.frame())]  -> [<end> -448]\n[<if> 448: ;if (is.call(colsub) && length(colsub) == 3L && colsub\\[\\[1L\\]\\] == \n    \":\")] n -> [<if> 450: ;if (is.call(colsub) && colsub\\[\\[1L\\]\\] == \"patterns\")]\n[<if> 450: ;if (is.call(colsub) && colsub\\[\\[1L\\]\\] == \"patterns\")] y -> [<none> 451: ;.SDcols = Reduce(intersect, do_patterns(colsub, names_x))]\n[<none> 451: ;.SDcols = Reduce(intersect, do_patterns(colsub, names_x))]  -> [<end> -450]\n[<if> 450: ;if (is.call(colsub) && colsub\\[\\[1L\\]\\] == \"patterns\")] n -> [<none> 452: ;.SDcols = eval(colsub, parent.frame(), parent.frame())]\n[<none> 452: ;.SDcols = eval(colsub, parent.frame(), parent.frame())]  -> [<end> -450]\n[<end> -450]  -> [<end> -448]\n[<end> -448]  -> [<if> 453: ;if (anyNA(.SDcols))]\n[<if> 453: ;if (anyNA(.SDcols))] y -> [<none> 454: ;stop(\".SDcols missing at the following indices: \", brackify(which(is.na(.SDcols))))]\n[<none> 454: ;stop(\".SDcols missing at the following indices: \", brackify(which(is.na(.SDcols))))]  -> [<stop> -454]\n[<if> 453: ;if (anyNA(.SDcols))] n -> [<end> -453]\n[<end> -453]  -> [<if> 455: ;if (is.logical(.SDcols))]\n[<if> 455: ;if (is.logical(.SDcols))] y -> [<none> 456: ;ansvals = which_(rep(.SDcols, length.out = length(x)), !negate_sdcols);ansvars = sdvars = names_x\\[ansvals\\]]\n[<none> 456: ;ansvals = which_(rep(.SDcols, length.out = length(x)), !negate_sdcols);ansvars = sdvars = names_x\\[ansvals\\]]  -> [<end> -455]\n[<if> 455: ;if (is.logical(.SDcols))] n -> [<if> 457: ;if (is.numeric(.SDcols))]\n[<if> 457: ;if (is.numeric(.SDcols))] y -> [<none> 458: ;.SDcols = as.integer(.SDcols)]\n[<none> 458: ;.SDcols = as.integer(.SDcols)]  -> [<if> 459: ;if (length(unique(sign(.SDcols))) > 1L)]\n[<if> 459: ;if (length(unique(sign(.SDcols))) > 1L)] y -> [<none> 460: ;stop(\".SDcols is numeric but has both +ve and -ve indices\")]\n[<none> 460: ;stop(\".SDcols is numeric but has both +ve and -ve indices\")]  -> [<stop> -460]\n[<if> 459: ;if (length(unique(sign(.SDcols))) > 1L)] n -> [<end> -459]\n[<end> -459]  -> [<if> 461: ;if (any(idx <- abs(.SDcols) > ncol(x) \\| abs(.SDcols) < 1L))]\n[<if> 461: ;if (any(idx <- abs(.SDcols) > ncol(x) \\| abs(.SDcols) < 1L))] y -> [<none> 462: ;stop(\".SDcols is numeric but out of bounds \\[1, \", ncol(x), \"\\] at: \", ;    brackify(which(idx)))]\n[<none> 462: ;stop(\".SDcols is numeric but out of bounds \\[1, \", ncol(x), \"\\] at: \", ;    brackify(which(idx)))]  -> [<stop> -462]\n[<if> 461: ;if (any(idx <- abs(.SDcols) > ncol(x) \\| abs(.SDcols) < 1L))] n -> [<end> -461]\n[<end> -461]  -> [<none> 463: ;ansvars = sdvars = if (negate_sdcols) dupdiff(names_x\\[-.SDcols\\], ;    bynames) else names_x\\[.SDcols\\];ansvals = if (negate_sdcols) setdiff(seq_along(names(x)), c(.SDcols, ;    which(names(x) %chin% bynames))) else .SDcols]\n[<none> 463: ;ansvars = sdvars = if (negate_sdcols) dupdiff(names_x\\[-.SDcols\\], ;    bynames) else names_x\\[.SDcols\\];ansvals = if (negate_sdcols) setdiff(seq_along(names(x)), c(.SDcols, ;    which(names(x) %chin% bynames))) else .SDcols]  -> [<end> -457]\n[<if> 457: ;if (is.numeric(.SDcols))] n -> [<if> 464: ;if (!is.character(.SDcols))]\n[<if> 464: ;if (!is.character(.SDcols))] y -> [<none> 465: ;stop(\".SDcols should be column numbers or names\")]\n[<none> 465: ;stop(\".SDcols should be column numbers or names\")]  -> [<stop> -465]\n[<if> 464: ;if (!is.character(.SDcols))] n -> [<end> -464]\n[<end> -464]  -> [<if> 466: ;if (!all(idx <- .SDcols %chin% names_x))]\n[<if> 466: ;if (!all(idx <- .SDcols %chin% names_x))] y -> [<none> 467: ;stop(\"Some items of .SDcols are not column names: \", brackify(.SDcols\\[!idx\\]))]\n[<none> 467: ;stop(\"Some items of .SDcols are not column names: \", brackify(.SDcols\\[!idx\\]))]  -> [<stop> -467]\n[<if> 466: ;if (!all(idx <- .SDcols %chin% names_x))] n -> [<end> -466]\n[<end> -466]  -> [<none> 468: ;ansvars = sdvars = if (negate_sdcols) setdiff(names_x, c(.SDcols, ;    bynames)) else .SDcols;ansvals = chmatch(ansvars, names_x)]\n[<none> 468: ;ansvars = sdvars = if (negate_sdcols) setdiff(names_x, c(.SDcols, ;    bynames)) else .SDcols;ansvals = chmatch(ansvars, names_x)]  -> [<end> -457]\n[<end> -457]  -> [<end> -455]\n[<end> -455]  -> [<end> -440]\n[<end> -440]  -> [<none> 469: ;allcols = c(names_x, xdotprefix, names_i, idotprefix)]\n[<none> 469: ;allcols = c(names_x, xdotprefix, names_i, idotprefix)]  -> [<if> 470: ;if (length(non_sdvars <- setdiff(intersect(av, allcols), c(bynames, \n    ansvars))))]\n[<if> 470: ;if (length(non_sdvars <- setdiff(intersect(av, allcols), c(bynames, \n    ansvars))))] y -> [<none> 471: ;ansvars = union(ansvars, non_sdvars);ansvals = chmatch(ansvars, names_x)]\n[<none> 471: ;ansvars = union(ansvars, non_sdvars);ansvals = chmatch(ansvars, names_x)]  -> [<end> -470]\n[<if> 470: ;if (length(non_sdvars <- setdiff(intersect(av, allcols), c(bynames, \n    ansvars))))] n -> [<end> -470]\n[<end> -470]  -> [<end> -439]\n[<if> 439: ;if (any(c(\".SD\", \"eval\", \"get\", \"mget\") %chin% av))] n -> [<if> 472: ;if (!missing(.SDcols))]\n[<if> 472: ;if (!missing(.SDcols))] y -> [<none> 473: ;warning(\"This j doesn't use .SD but .SDcols has been supplied. Ignoring .SDcols. See ?data.table.\")]\n[<none> 473: ;warning(\"This j doesn't use .SD but .SDcols has been supplied. Ignoring .SDcols. See ?data.table.\")]  -> [<end> -472]\n[<if> 472: ;if (!missing(.SDcols))] n -> [<end> -472]\n[<end> -472]  -> [<none> 474: ;allcols = c(names_x, xdotprefix, names_i, idotprefix);ansvars = sdvars = setdiff(intersect(av, allcols), bynames)]\n[<none> 474: ;allcols = c(names_x, xdotprefix, names_i, idotprefix);ansvars = sdvars = setdiff(intersect(av, allcols), bynames)]  -> [<if> 475: ;if (verbose)]\n[<if> 475: ;if (verbose)] y -> [<none> 476: ;cat(\"Detected that j uses these columns:\", if (!length(ansvars)) \"<none>\" else paste(ansvars, ;    collapse = \",\"), \"\\n\")]\n[<none> 476: ;cat(\"Detected that j uses these columns:\", if (!length(ansvars)) \"<none>\" else paste(ansvars, ;    collapse = \",\"), \"\\n\")]  -> [<end> -475]\n[<if> 475: ;if (verbose)] n -> [<end> -475]\n[<end> -475]  -> [<none> 477: ;ansvals = chmatch(ansvars, names_x)]\n[<none> 477: ;ansvals = chmatch(ansvars, names_x)]  -> [<end> -439]\n[<end> -439]  -> [<if> 478: ;if (any(c(\"get\", \"mget\") %chin% av))]\n[<if> 478: ;if (any(c(\"get\", \"mget\") %chin% av))] y -> [<if> 479: ;if (verbose)]\n[<if> 479: ;if (verbose)] y -> [<none> 480: ;cat(\"'(m)get' found in j. ansvars being set to all columns. Use .SDcols or a single j=eval(macro) instead. Both will detect the columns used which is important for efficiency.\\nOld:\", ;    paste(ansvars, collapse = \",\"), \"\\n\")]\n[<none> 480: ;cat(\"'(m)get' found in j. ansvars being set to all columns. Use .SDcols or a single j=eval(macro) instead. Both will detect the columns used which is important for efficiency.\\nOld:\", ;    paste(ansvars, collapse = \",\"), \"\\n\")]  -> [<end> -479]\n[<if> 479: ;if (verbose)] n -> [<end> -479]\n[<end> -479]  -> [<if> 481: ;if (is.call(jsub) && length(jsub\\[\\[1L\\]\\]) == 1L && jsub\\[\\[1L\\]\\] == \n    \":=\" && is.symbol(jsub\\[\\[2L\\]\\]))]\n[<if> 481: ;if (is.call(jsub) && length(jsub\\[\\[1L\\]\\]) == 1L && jsub\\[\\[1L\\]\\] == \n    \":=\" && is.symbol(jsub\\[\\[2L\\]\\]))] y -> [<none> 482: ;jsub_lhs_symbol = as.character(jsub\\[\\[2L\\]\\])]\n[<none> 482: ;jsub_lhs_symbol = as.character(jsub\\[\\[2L\\]\\])]  -> [<if> 483: ;if (jsub_lhs_symbol %chin% non_sdvars)]\n[<if> 483: ;if (jsub_lhs_symbol %chin% non_sdvars)] y -> [<none> 484: ;sdvars = setdiff(sdvars, jsub_lhs_symbol)]\n[<none> 484: ;sdvars = setdiff(sdvars, jsub_lhs_symbol)]  -> [<end> -483]\n[<if> 483: ;if (jsub_lhs_symbol %chin% non_sdvars)] n -> [<end> -483]\n[<end> -483]  -> [<end> -481]\n[<if> 481: ;if (is.call(jsub) && length(jsub\\[\\[1L\\]\\]) == 1L && jsub\\[\\[1L\\]\\] == \n    \":=\" && is.symbol(jsub\\[\\[2L\\]\\]))] n -> [<end> -481]\n[<end> -481]  -> [<none> 485: ;allcols = c(names_x, xdotprefix, names_i, idotprefix);ansvars = setdiff(allcols, bynames);non_sdvars = setdiff(ansvars, sdvars);ansvals = chmatch(ansvars, names_x)]\n[<none> 485: ;allcols = c(names_x, xdotprefix, names_i, idotprefix);ansvars = setdiff(allcols, bynames);non_sdvars = setdiff(ansvars, sdvars);ansvals = chmatch(ansvars, names_x)]  -> [<if> 486: ;if (verbose)]\n[<if> 486: ;if (verbose)] y -> [<none> 487: ;cat(\"New:\", paste(ansvars, collapse = \",\"), \"\\n\")]\n[<none> 487: ;cat(\"New:\", paste(ansvars, collapse = \",\"), \"\\n\")]  -> [<end> -486]\n[<if> 486: ;if (verbose)] n -> [<end> -486]\n[<end> -486]  -> [<end> -478]\n[<if> 478: ;if (any(c(\"get\", \"mget\") %chin% av))] n -> [<end> -478]\n[<end> -478]  -> [<none> 488: ;lhs = NULL;newnames = NULL;suppPrint = identity]\n[<none> 488: ;lhs = NULL;newnames = NULL;suppPrint = identity]  -> [<if> 489: ;if (length(av) && av\\[1L\\] == \":=\")]\n[<if> 489: ;if (length(av) && av\\[1L\\] == \":=\")] y -> [<if> 490: ;if (.Call(C_islocked, x))]\n[<if> 490: ;if (.Call(C_islocked, x))] y -> [<none> 491: ;stop(\".SD is locked. Using := in .SD's j is reserved for possible future use; a tortuously flexible way to modify by group. Use := in j directly to modify by group by reference.\")]\n[<none> 491: ;stop(\".SD is locked. Using := in .SD's j is reserved for possible future use; a tortuously flexible way to modify by group. Use := in j directly to modify by group by reference.\")]  -> [<stop> -491]\n[<if> 490: ;if (.Call(C_islocked, x))] n -> [<end> -490]\n[<end> -490]  -> [<none> 492: ;suppPrint = function(x) {;    .global$print = address(x);    x;}]\n[<none> 492: ;suppPrint = function(x) {;    .global$print = address(x);    x;}]  -> [<if> 493: ;if (is.null(names(jsub)))]\n[<if> 493: ;if (is.null(names(jsub)))] y -> [<if> 494: ;if (length(jsub) != 3L)]\n[<if> 494: ;if (length(jsub) != 3L)] y -> [<none> 495: ;stop(\"In `:=`(col1=val1, col2=val2, ...) form, all arguments must be named.\")]\n[<none> 495: ;stop(\"In `:=`(col1=val1, col2=val2, ...) form, all arguments must be named.\")]  -> [<stop> -495]\n[<if> 494: ;if (length(jsub) != 3L)] n -> [<end> -494]\n[<end> -494]  -> [<none> 496: ;lhs = jsub\\[\\[2L\\]\\];jsub = jsub\\[\\[3L\\]\\]]\n[<none> 496: ;lhs = jsub\\[\\[2L\\]\\];jsub = jsub\\[\\[3L\\]\\]]  -> [<if> 497: ;if (is.name(lhs))]\n[<if> 497: ;if (is.name(lhs))] y -> [<none> 498: ;lhs = as.character(lhs)]\n[<none> 498: ;lhs = as.character(lhs)]  -> [<end> -497]\n[<if> 497: ;if (is.name(lhs))] n -> [<none> 499: ;lhs = eval(lhs, parent.frame(), parent.frame())]\n[<none> 499: ;lhs = eval(lhs, parent.frame(), parent.frame())]  -> [<end> -497]\n[<end> -497]  -> [<end> -493]\n[<if> 493: ;if (is.null(names(jsub)))] n -> [<none> 500: ;lhs = names(jsub)\\[-1L\\]]\n[<none> 500: ;lhs = names(jsub)\\[-1L\\]]  -> [<if> 501: ;if (any(lhs == \"\"))]\n[<if> 501: ;if (any(lhs == \"\"))] y -> [<none> 502: ;stop(\"In `:=`(col1=val1, col2=val2, ...) form, all arguments must be named.\")]\n[<none> 502: ;stop(\"In `:=`(col1=val1, col2=val2, ...) form, all arguments must be named.\")]  -> [<stop> -502]\n[<if> 501: ;if (any(lhs == \"\"))] n -> [<end> -501]\n[<end> -501]  -> [<none> 503: ;names(jsub) = \"\";jsub\\[\\[1L\\]\\] = as.name(\"list\")]\n[<none> 503: ;names(jsub) = \"\";jsub\\[\\[1L\\]\\] = as.name(\"list\")]  -> [<end> -493]\n[<end> -493]  -> [<none> 504: ;av = all.vars(jsub, TRUE)]\n[<none> 504: ;av = all.vars(jsub, TRUE)]  -> [<if> 505: ;if (!is.atomic(lhs))]\n[<if> 505: ;if (!is.atomic(lhs))] y -> [<none> 506: ;stop(\"LHS of := must be a symbol, or an atomic vector (column names or positions).\")]\n[<none> 506: ;stop(\"LHS of := must be a symbol, or an atomic vector (column names or positions).\")]  -> [<stop> -506]\n[<if> 505: ;if (!is.atomic(lhs))] n -> [<end> -505]\n[<end> -505]  -> [<if> 507: ;if (is.character(lhs))]\n[<if> 507: ;if (is.character(lhs))] y -> [<none> 508: ;m = chmatch(lhs, names_x)]\n[<none> 508: ;m = chmatch(lhs, names_x)]  -> [<end> -507]\n[<if> 507: ;if (is.character(lhs))] n -> [<if> 509: ;if (is.numeric(lhs))]\n[<if> 509: ;if (is.numeric(lhs))] y -> [<none> 510: ;m = as.integer(lhs)]\n[<none> 510: ;m = as.integer(lhs)]  -> [<if> 511: ;if (any(m < 1L \\| ncol(x) < m))]\n[<if> 511: ;if (any(m < 1L \\| ncol(x) < m))] y -> [<none> 512: ;stop(\"LHS of := appears to be column positions but are outside \\[1,ncol\\] range. New columns can only be added by name.\")]\n[<none> 512: ;stop(\"LHS of := appears to be column positions but are outside \\[1,ncol\\] range. New columns can only be added by name.\")]  -> [<stop> -512]\n[<if> 511: ;if (any(m < 1L \\| ncol(x) < m))] n -> [<end> -511]\n[<end> -511]  -> [<none> 513: ;lhs = names_x\\[m\\]]\n[<none> 513: ;lhs = names_x\\[m\\]]  -> [<end> -509]\n[<if> 509: ;if (is.numeric(lhs))] n -> [<none> 514: ;stop(\"LHS of := isn't column names ('character') or positions ('integer' or 'numeric')\")]\n[<none> 514: ;stop(\"LHS of := isn't column names ('character') or positions ('integer' or 'numeric')\")]  -> [<stop> -514]\n[<end> -509]  -> [<end> -507]\n[<end> -507]  -> [<if> 515: ;if (all(!is.na(m)))]\n[<if> 515: ;if (all(!is.na(m)))] y -> [<none> 516: ;cols = as.integer(m);newnames = NULL]\n[<none> 516: ;cols = as.integer(m);newnames = NULL]  -> [<if> 517: ;if (identical(irows, integer()))]\n[<if> 517: ;if (identical(irows, integer()))] y -> [<if> 518: ;if (verbose)]\n[<if> 518: ;if (verbose)] y -> [<none> 519: ;cat(\"No rows match i. No new columns to add so not evaluating RHS of :=\\n\");cat(\"Assigning to 0 row subset of\", nrow(x), \"rows\\n\")]\n[<none> 519: ;cat(\"No rows match i. No new columns to add so not evaluating RHS of :=\\n\");cat(\"Assigning to 0 row subset of\", nrow(x), \"rows\\n\")]  -> [<end> -518]\n[<if> 518: ;if (verbose)] n -> [<end> -518]\n[<end> -518]  -> [<none> 520: ;.Call(Cassign, x, irows, NULL, NULL, NULL);.global$print = address(x);return(invisible(x))]\n[<none> 520: ;.Call(Cassign, x, irows, NULL, NULL, NULL);.global$print = address(x);return(invisible(x))]  -> [<return> -520]\n[<if> 517: ;if (identical(irows, integer()))] n -> [<end> -517]\n[<end> -517]  -> [<end> -515]\n[<if> 515: ;if (all(!is.na(m)))] n -> [<none> 521: ;newnames = setdiff(lhs, names_x);m\\[is.na(m)\\] = ncol(x) + seq_len(length(newnames));cols = as.integer(m)]\n[<none> 521: ;newnames = setdiff(lhs, names_x);m\\[is.na(m)\\] = ncol(x) + seq_len(length(newnames));cols = as.integer(m)]  -> [<if> 522: ;if ((ok <- selfrefok(x, verbose = FALSE)) == 0L)]\n[<if> 522: ;if ((ok <- selfrefok(x, verbose = FALSE)) == 0L)] y -> [<none> 523: ;warning(\"Invalid .internal.selfref detected and fixed by taking a (shallow) copy of the data.table so that := can add this new column by reference. At an earlier point, this data.table has been copied by R (or was created manually using structure() or similar). Avoid names<- and attr<- which in R currently (and oddly) may copy the whole data.table. Use set* syntax instead to avoid copying: ?set, ?setnames and ?setattr. If this message doesn't help, please report your use case to the data.table issue tracker so the root cause can be fixed or this message improved.\")]\n[<none> 523: ;warning(\"Invalid .internal.selfref detected and fixed by taking a (shallow) copy of the data.table so that := can add this new column by reference. At an earlier point, this data.table has been copied by R (or was created manually using structure() or similar). Avoid names<- and attr<- which in R currently (and oddly) may copy the whole data.table. Use set* syntax instead to avoid copying: ?set, ?setnames and ?setattr. If this message doesn't help, please report your use case to the data.table issue tracker so the root cause can be fixed or this message improved.\")]  -> [<end> -522]\n[<if> 522: ;if ((ok <- selfrefok(x, verbose = FALSE)) == 0L)] n -> [<end> -522]\n[<end> -522]  -> [<if> 524: ;if ((ok < 1L) \\|\\| (truelength(x) < ncol(x) + length(newnames)))]\n[<if> 524: ;if ((ok < 1L) \\|\\| (truelength(x) < ncol(x) + length(newnames)))] y -> [<none> 525: ;DT = x;n = length(newnames) + eval(getOption(\"datatable.alloccol\"));name = substitute(x)]\n[<none> 525: ;DT = x;n = length(newnames) + eval(getOption(\"datatable.alloccol\"));name = substitute(x)]  -> [<if> 526: ;if (is.name(name) && ok && verbose)]\n[<if> 526: ;if (is.name(name) && ok && verbose)] y -> [<none> 527: ;cat(\"Growing vector of column pointers from truelength \", truelength(x), ;    \" to \", n, \". A shallow copy has been taken, see ?setalloccol. Only a potential issue if two variables point to the same data (we can't yet detect that well) and if not you can safely ignore this. To avoid this message you could setalloccol() first, deep copy first using copy(), wrap with suppressWarnings() or increase the 'datatable.alloccol' option.\\n\")]\n[<none> 527: ;cat(\"Growing vector of column pointers from truelength \", truelength(x), ;    \" to \", n, \". A shallow copy has been taken, see ?setalloccol. Only a potential issue if two variables point to the same data (we can't yet detect that well) and if not you can safely ignore this. To avoid this message you could setalloccol() first, deep copy first using copy(), wrap with suppressWarnings() or increase the 'datatable.alloccol' option.\\n\")]  -> [<if> 528: ;if (ok == -1L)]\n[<if> 528: ;if (ok == -1L)] y -> [<none> 529: ;cat(\"Note that the shallow copy will assign to the environment from which := was called. That means for example that if := was called within a function, the original table may be unaffected.\\n\")]\n[<none> 529: ;cat(\"Note that the shallow copy will assign to the environment from which := was called. That means for example that if := was called within a function, the original table may be unaffected.\\n\")]  -> [<end> -528]\n[<if> 528: ;if (ok == -1L)] n -> [<end> -528]\n[<end> -528]  -> [<end> -526]\n[<if> 526: ;if (is.name(name) && ok && verbose)] n -> [<end> -526]\n[<end> -526]  -> [<none> 530: ;setalloccol(x, n, verbose = verbose)]\n[<none> 530: ;setalloccol(x, n, verbose = verbose)]  -> [<if> 531: ;if (is.name(name))]\n[<if> 531: ;if (is.name(name))] y -> [<none> 532: ;assign(as.character(name), x, parent.frame(), inherits = TRUE)]\n[<none> 532: ;assign(as.character(name), x, parent.frame(), inherits = TRUE)]  -> [<end> -531]\n[<if> 531: ;if (is.name(name))] n -> [<if> 533: ;if (is.call(name) && (name\\[\\[1L\\]\\] == \"$\" \\|\\| name\\[\\[1L\\]\\] == \"\\[\\[\") && \n    is.name(name\\[\\[2L\\]\\]))]\n[<if> 533: ;if (is.call(name) && (name\\[\\[1L\\]\\] == \"$\" \\|\\| name\\[\\[1L\\]\\] == \"\\[\\[\") && \n    is.name(name\\[\\[2L\\]\\]))] y -> [<none> 534: ;k = eval(name\\[\\[2L\\]\\], parent.frame(), parent.frame())]\n[<none> 534: ;k = eval(name\\[\\[2L\\]\\], parent.frame(), parent.frame())]  -> [<if> 535: ;if (is.list(k))]\n[<if> 535: ;if (is.list(k))] y -> [<none> 536: ;origj = j = if (name\\[\\[1L\\]\\] == \"$\") as.character(name\\[\\[3L\\]\\]) else eval(name\\[\\[3L\\]\\], ;    parent.frame(), parent.frame())]\n[<none> 536: ;origj = j = if (name\\[\\[1L\\]\\] == \"$\") as.character(name\\[\\[3L\\]\\]) else eval(name\\[\\[3L\\]\\], ;    parent.frame(), parent.frame())]  -> [<if> 537: ;if (is.character(j))]\n[<if> 537: ;if (is.character(j))] y -> [<if> 538: ;if (length(j) != 1L)]\n[<if> 538: ;if (length(j) != 1L)] y -> [<none> 539: ;stop(\"Cannot assign to an under-allocated recursively indexed list -- L\\[\\[i\\]\\]\\[,:=\\] syntax is only valid when i is length 1, but it's length \", ;    length(j))]\n[<none> 539: ;stop(\"Cannot assign to an under-allocated recursively indexed list -- L\\[\\[i\\]\\]\\[,:=\\] syntax is only valid when i is length 1, but it's length \", ;    length(j))]  -> [<stop> -539]\n[<if> 538: ;if (length(j) != 1L)] n -> [<end> -538]\n[<end> -538]  -> [<none> 540: ;j = match(j, names(k))]\n[<none> 540: ;j = match(j, names(k))]  -> [<if> 541: ;if (is.na(j))]\n[<if> 541: ;if (is.na(j))] y -> [<none> 542: ;stop(\"Internal error -- item '\", origj, \"' not found in names of list\")]\n[<none> 542: ;stop(\"Internal error -- item '\", origj, \"' not found in names of list\")]  -> [<stop> -542]\n[<if> 541: ;if (is.na(j))] n -> [<end> -541]\n[<end> -541]  -> [<end> -537]\n[<if> 537: ;if (is.character(j))] n -> [<end> -537]\n[<end> -537]  -> [<none> 543: ;.Call(Csetlistelt, k, as.integer(j), x)]\n[<none> 543: ;.Call(Csetlistelt, k, as.integer(j), x)]  -> [<end> -535]\n[<if> 535: ;if (is.list(k))] n -> [<if> 544: ;if (is.environment(k) && exists(as.character(name\\[\\[3L\\]\\]), k))]\n[<if> 544: ;if (is.environment(k) && exists(as.character(name\\[\\[3L\\]\\]), k))] y -> [<none> 545: ;assign(as.character(name\\[\\[3L\\]\\]), x, k, inherits = FALSE)]\n[<none> 545: ;assign(as.character(name\\[\\[3L\\]\\]), x, k, inherits = FALSE)]  -> [<end> -544]\n[<if> 544: ;if (is.environment(k) && exists(as.character(name\\[\\[3L\\]\\]), k))] n -> [<end> -544]\n[<end> -544]  -> [<end> -535]\n[<end> -535]  -> [<end> -533]\n[<if> 533: ;if (is.call(name) && (name\\[\\[1L\\]\\] == \"$\" \\|\\| name\\[\\[1L\\]\\] == \"\\[\\[\") && \n    is.name(name\\[\\[2L\\]\\]))] n -> [<end> -533]\n[<end> -533]  -> [<end> -531]\n[<end> -531]  -> [<end> -524]\n[<if> 524: ;if ((ok < 1L) \\|\\| (truelength(x) < ncol(x) + length(newnames)))] n -> [<end> -524]\n[<end> -524]  -> [<end> -515]\n[<end> -515]  -> [<end> -489]\n[<if> 489: ;if (length(av) && av\\[1L\\] == \":=\")] n -> [<end> -489]\n[<end> -489]  -> [<end> -275]\n[<end> -275]  -> [<if> 546: ;if (length(ansvars))]\n[<if> 546: ;if (length(ansvars))] y -> [<none> 547: ;w = ansvals]\n[<none> 547: ;w = ansvals]  -> [<if> 548: ;if (length(rightcols) && missingby)]\n[<if> 548: ;if (length(rightcols) && missingby)] y -> [<none> 549: ;w\\[w %in% rightcols\\] = NA]\n[<none> 549: ;w\\[w %in% rightcols\\] = NA]  -> [<end> -548]\n[<if> 548: ;if (length(rightcols) && missingby)] n -> [<end> -548]\n[<end> -548]  -> [<if> 550: ;if (any(xdotprefixvals <- ansvars %chin% xdotprefix))]\n[<if> 550: ;if (any(xdotprefixvals <- ansvars %chin% xdotprefix))] y -> [<none> 551: ;w\\[xdotprefixvals\\] = chmatch(ansvars\\[xdotprefixvals\\], xdotprefix);xdotcols = TRUE]\n[<none> 551: ;w\\[xdotprefixvals\\] = chmatch(ansvars\\[xdotprefixvals\\], xdotprefix);xdotcols = TRUE]  -> [<end> -550]\n[<if> 550: ;if (any(xdotprefixvals <- ansvars %chin% xdotprefix))] n -> [<end> -550]\n[<end> -550]  -> [<if> 552: ;if (!any(wna <- is.na(w)))]\n[<if> 552: ;if (!any(wna <- is.na(w)))] y -> [<none> 553: ;xcols = w;xcolsAns = seq_along(ansvars);icols = icolsAns = integer()]\n[<none> 553: ;xcols = w;xcolsAns = seq_along(ansvars);icols = icolsAns = integer()]  -> [<end> -552]\n[<if> 552: ;if (!any(wna <- is.na(w)))] n -> [<if> 554: ;if (!length(leftcols))]\n[<if> 554: ;if (!length(leftcols))] y -> [<none> 555: ;stop(\"Internal error -- column(s) not found: \", paste(ansvars\\[wna\\], ;    collapse = \", \"))]\n[<none> 555: ;stop(\"Internal error -- column(s) not found: \", paste(ansvars\\[wna\\], ;    collapse = \", \"))]  -> [<stop> -555]\n[<if> 554: ;if (!length(leftcols))] n -> [<end> -554]\n[<end> -554]  -> [<none> 556: ;xcols = w\\[!wna\\];xcolsAns = which(!wna);map = c(seq_along(i), leftcols);names(map) = c(names_i, names_x\\[rightcols\\]);w2 = map\\[ansvars\\[wna\\]\\]]\n[<none> 556: ;xcols = w\\[!wna\\];xcolsAns = which(!wna);map = c(seq_along(i), leftcols);names(map) = c(names_i, names_x\\[rightcols\\]);w2 = map\\[ansvars\\[wna\\]\\]]  -> [<if> 557: ;if (any(w2na <- is.na(w2)))]\n[<if> 557: ;if (any(w2na <- is.na(w2)))] y -> [<none> 558: ;ivars = paste0(\"i.\", names_i);ivars\\[leftcols\\] = names_i\\[leftcols\\];w2\\[w2na\\] = chmatch(ansvars\\[wna\\]\\[w2na\\], ivars)]\n[<none> 558: ;ivars = paste0(\"i.\", names_i);ivars\\[leftcols\\] = names_i\\[leftcols\\];w2\\[w2na\\] = chmatch(ansvars\\[wna\\]\\[w2na\\], ivars)]  -> [<if> 559: ;if (any(w2na <- is.na(w2)))]\n[<if> 559: ;if (any(w2na <- is.na(w2)))] y -> [<none> 560: ;ivars\\[leftcols\\] = paste0(\"i.\", ivars\\[leftcols\\]);w2\\[w2na\\] = chmatch(ansvars\\[wna\\]\\[w2na\\], ivars)]\n[<none> 560: ;ivars\\[leftcols\\] = paste0(\"i.\", ivars\\[leftcols\\]);w2\\[w2na\\] = chmatch(ansvars\\[wna\\]\\[w2na\\], ivars)]  -> [<if> 561: ;if (any(w2na <- is.na(w2)))]\n[<if> 561: ;if (any(w2na <- is.na(w2)))] y -> [<none> 562: ;stop(\"Internal error -- column(s) not found: \", paste(ansvars\\[wna\\]\\[w2na\\], ;    sep = \", \"))]\n[<none> 562: ;stop(\"Internal error -- column(s) not found: \", paste(ansvars\\[wna\\]\\[w2na\\], ;    sep = \", \"))]  -> [<stop> -562]\n[<if> 561: ;if (any(w2na <- is.na(w2)))] n -> [<end> -561]\n[<end> -561]  -> [<end> -559]\n[<if> 559: ;if (any(w2na <- is.na(w2)))] n -> [<end> -559]\n[<end> -559]  -> [<end> -557]\n[<if> 557: ;if (any(w2na <- is.na(w2)))] n -> [<end> -557]\n[<end> -557]  -> [<none> 563: ;icols = w2;icolsAns = which(wna)]\n[<none> 563: ;icols = w2;icolsAns = which(wna)]  -> [<end> -552]\n[<end> -552]  -> [<end> -546]\n[<if> 546: ;if (length(ansvars))] n -> [<end> -546]\n[<end> -546]  -> [<end> -250]\n[<end> -250]  -> [<none> 564: ;SDenv = new.env(parent = parent.frame());SDenv$strptime = function(x, ...) {;    warning(\"strptime() usage detected and wrapped with as.POSIXct(). This is to minimize the chance of assigning POSIXlt columns, which use 40+ bytes to store one date (versus 8 for POSIXct). Use as.POSIXct() (which will call strptime() as needed internally) to avoid this warning.\");    as.POSIXct(base::strptime(x, ...));};syms = all.vars(jsub);syms = syms\\[substring(syms, 1L, 2L) == \"..\"\\];syms = syms\\[substring(syms, 3L, 3L) != \".\"\\]]\n[<none> 564: ;SDenv = new.env(parent = parent.frame());SDenv$strptime = function(x, ...) {;    warning(\"strptime() usage detected and wrapped with as.POSIXct(). This is to minimize the chance of assigning POSIXlt columns, which use 40+ bytes to store one date (versus 8 for POSIXct). Use as.POSIXct() (which will call strptime() as needed internally) to avoid this warning.\");    as.POSIXct(base::strptime(x, ...));};syms = all.vars(jsub);syms = syms\\[substring(syms, 1L, 2L) == \"..\"\\];syms = syms\\[substring(syms, 3L, 3L) != \".\"\\]]  -> [<for> 565: ;for (sym in syms)]\n[<for> 565: ;for (sym in syms)]  -> [<if> 566: ;if (sym %chin% names_x)]\n[<if> 566: ;if (sym %chin% names_x)] y -> [<none> 567: ;next]\n[<none> 567: ;next]  -> [<end> -566]\n[<if> 566: ;if (sym %chin% names_x)] n -> [<end> -566]\n[<end> -566]  -> [<none> 568: ;getName = substring(sym, 3L)]\n[<none> 568: ;getName = substring(sym, 3L)]  -> [<if> 569: ;if (!exists(getName, parent.frame()))]\n[<if> 569: ;if (!exists(getName, parent.frame()))] y -> [<if> 570: ;if (exists(sym, parent.frame()))]\n[<if> 570: ;if (exists(sym, parent.frame()))] y -> [<none> 571: ;next]\n[<none> 571: ;next]  -> [<end> -570]\n[<if> 570: ;if (exists(sym, parent.frame()))] n -> [<end> -570]\n[<end> -570]  -> [<none> 572: ;stop(\"Variable '\", getName, \"' is not found in calling scope. Looking in calling scope because this symbol was prefixed with .. in the j= parameter.\")]\n[<none> 572: ;stop(\"Variable '\", getName, \"' is not found in calling scope. Looking in calling scope because this symbol was prefixed with .. in the j= parameter.\")]  -> [<stop> -572]\n[<if> 569: ;if (!exists(getName, parent.frame()))] n -> [<end> -569]\n[<end> -569]  -> [<none> 573: ;assign(sym, get(getName, parent.frame()), SDenv)]\n[<none> 573: ;assign(sym, get(getName, parent.frame()), SDenv)]  -> [<start> -565]\n[<for> 565: ;for (sym in syms)] next <- [<start> -565]\n[<start> -565]  -> [<if> 574: ;if (missingby \\|\\| bynull \\|\\| (!byjoin && !length(byval)))]\n[<if> 574: ;if (missingby \\|\\| bynull \\|\\| (!byjoin && !length(byval)))] y -> [<if> 575: ;if (length(ansvars))]\n[<if> 575: ;if (length(ansvars))] y -> [<if> 576: ;if (!(length(i) && length(icols)))]\n[<if> 576: ;if (!(length(i) && length(icols)))] y -> [<if> 577: ;if (!identical(xcolsAns, seq_along(xcolsAns)) \\|\\| length(xcols) != \n    length(xcolsAns) \\|\\| length(ansvars) != length(xcolsAns))]\n[<if> 577: ;if (!identical(xcolsAns, seq_along(xcolsAns)) \\|\\| length(xcols) != \n    length(xcolsAns) \\|\\| length(ansvars) != length(xcolsAns))] y -> [<none> 578: ;stop(\"Internal error: xcolAns does not pass checks: \", length(xcolsAns), ;    length(ansvars), length(xcols), paste(xcolsAns, collapse = \",\"))]\n[<none> 578: ;stop(\"Internal error: xcolAns does not pass checks: \", length(xcolsAns), ;    length(ansvars), length(xcols), paste(xcolsAns, collapse = \",\"))]  -> [<stop> -578]\n[<if> 577: ;if (!identical(xcolsAns, seq_along(xcolsAns)) \\|\\| length(xcols) != \n    length(xcolsAns) \\|\\| length(ansvars) != length(xcolsAns))] n -> [<end> -577]\n[<end> -577]  -> [<none> 579: ;ans = if (with && is.null(irows)) shallow(x, xcols) else .Call(CsubsetDT, ;    x, irows, xcols);setattr(ans, \"names\", ansvars)]\n[<none> 579: ;ans = if (with && is.null(irows)) shallow(x, xcols) else .Call(CsubsetDT, ;    x, irows, xcols);setattr(ans, \"names\", ansvars)]  -> [<end> -576]\n[<if> 576: ;if (!(length(i) && length(icols)))] n -> [<if> 580: ;if (is.null(irows))]\n[<if> 580: ;if (is.null(irows))] y -> [<none> 581: ;stop(\"Internal error: irows is NULL when making join result at R level. Should no longer happen now we use CsubsetDT earlier.\")]\n[<none> 581: ;stop(\"Internal error: irows is NULL when making join result at R level. Should no longer happen now we use CsubsetDT earlier.\")]  -> [<stop> -581]\n[<if> 580: ;if (is.null(irows))] n -> [<end> -580]\n[<end> -580]  -> [<none> 582: ;ans = vector(\"list\", length(ansvars));ii = rep.int(indices__, len__)]\n[<none> 582: ;ans = vector(\"list\", length(ansvars));ii = rep.int(indices__, len__)]  -> [<for> 583: ;for (s in seq_along(icols))]\n[<for> 583: ;for (s in seq_along(icols))]  -> [<none> 584: ;target = icolsAns\\[s\\];source = icols\\[s\\];ans\\[\\[target\\]\\] = .Call(CsubsetVector, i\\[\\[source\\]\\], ii)]\n[<none> 584: ;target = icolsAns\\[s\\];source = icols\\[s\\];ans\\[\\[target\\]\\] = .Call(CsubsetVector, i\\[\\[source\\]\\], ii)]  -> [<start> -583]\n[<for> 583: ;for (s in seq_along(icols))] next <- [<start> -583]\n[<start> -583]  -> [<for> 585: ;for (s in seq_along(xcols))]\n[<for> 585: ;for (s in seq_along(xcols))]  -> [<none> 586: ;target = xcolsAns\\[s\\];source = xcols\\[s\\];ans\\[\\[target\\]\\] = .Call(CsubsetVector, x\\[\\[source\\]\\], irows)]\n[<none> 586: ;target = xcolsAns\\[s\\];source = xcols\\[s\\];ans\\[\\[target\\]\\] = .Call(CsubsetVector, x\\[\\[source\\]\\], irows)]  -> [<start> -585]\n[<for> 585: ;for (s in seq_along(xcols))] next <- [<start> -585]\n[<start> -585]  -> [<none> 587: ;setattr(ans, \"names\", ansvars)]\n[<none> 587: ;setattr(ans, \"names\", ansvars)]  -> [<if> 588: ;if (haskey(x))]\n[<if> 588: ;if (haskey(x))] y -> [<none> 589: ;keylen = which.first(!key(x) %chin% ansvars) - 1L]\n[<none> 589: ;keylen = which.first(!key(x) %chin% ansvars) - 1L]  -> [<if> 590: ;if (is.na(keylen))]\n[<if> 590: ;if (is.na(keylen))] y -> [<none> 591: ;keylen = length(key(x))]\n[<none> 591: ;keylen = length(key(x))]  -> [<end> -590]\n[<if> 590: ;if (is.na(keylen))] n -> [<end> -590]\n[<end> -590]  -> [<none> 592: ;len = length(rightcols);chk = if (len && !missing(on)) !identical(head(key(x), len), ;    names(on)) else FALSE]\n[<none> 592: ;len = length(rightcols);chk = if (len && !missing(on)) !identical(head(key(x), len), ;    names(on)) else FALSE]  -> [<if> 593: ;if ((keylen > len \\|\\| chk) && !.Call(CisOrderedSubset, irows, \n    nrow(x)))]\n[<if> 593: ;if ((keylen > len \\|\\| chk) && !.Call(CisOrderedSubset, irows, \n    nrow(x)))] y -> [<none> 594: ;keylen = if (!chk) len else 0L]\n[<none> 594: ;keylen = if (!chk) len else 0L]  -> [<end> -593]\n[<if> 593: ;if ((keylen > len \\|\\| chk) && !.Call(CisOrderedSubset, irows, \n    nrow(x)))] n -> [<end> -593]\n[<end> -593]  -> [<none> 595: ;ichk = is.data.table(i) && haskey(i) && identical(head(key(i), ;    length(leftcols)), names_i\\[leftcols\\])]\n[<none> 595: ;ichk = is.data.table(i) && haskey(i) && identical(head(key(i), ;    length(leftcols)), names_i\\[leftcols\\])]  -> [<if> 596: ;if (keylen && (ichk \\|\\| is.logical(i) \\|\\| (.Call(CisOrderedSubset, \n    irows, nrow(x)) && ((roll == FALSE) \\|\\| length(irows) == \n    1L))))]\n[<if> 596: ;if (keylen && (ichk \\|\\| is.logical(i) \\|\\| (.Call(CisOrderedSubset, \n    irows, nrow(x)) && ((roll == FALSE) \\|\\| length(irows) == \n    1L))))] y -> [<none> 597: ;setattr(ans, \"sorted\", head(key(x), keylen))]\n[<none> 597: ;setattr(ans, \"sorted\", head(key(x), keylen))]  -> [<end> -596]\n[<if> 596: ;if (keylen && (ichk \\|\\| is.logical(i) \\|\\| (.Call(CisOrderedSubset, \n    irows, nrow(x)) && ((roll == FALSE) \\|\\| length(irows) == \n    1L))))] n -> [<end> -596]\n[<end> -596]  -> [<end> -588]\n[<if> 588: ;if (haskey(x))] n -> [<end> -588]\n[<end> -588]  -> [<none> 598: ;setattr(ans, \"class\", class(x));setattr(ans, \"row.names\", .set_row_names(nrow(ans)));setalloccol(ans)]\n[<none> 598: ;setattr(ans, \"class\", class(x));setattr(ans, \"row.names\", .set_row_names(nrow(ans)));setalloccol(ans)]  -> [<end> -576]\n[<end> -576]  -> [<if> 599: ;if (!with \\|\\| missing(j))]\n[<if> 599: ;if (!with \\|\\| missing(j))] y -> [<none> 600: ;return(ans)]\n[<none> 600: ;return(ans)]  -> [<return> -600]\n[<if> 599: ;if (!with \\|\\| missing(j))] n -> [<end> -599]\n[<end> -599]  -> [<none> 601: ;SDenv$.SDall = ans;SDenv$.SD = if (length(non_sdvars)) shallow(SDenv$.SDall, sdvars) else SDenv$.SDall;SDenv$.N = nrow(ans)]\n[<none> 601: ;SDenv$.SDall = ans;SDenv$.SD = if (length(non_sdvars)) shallow(SDenv$.SDall, sdvars) else SDenv$.SDall;SDenv$.N = nrow(ans)]  -> [<end> -575]\n[<if> 575: ;if (length(ansvars))] n -> [<none> 602: ;SDenv$.SDall = SDenv$.SD = null.data.table();SDenv$.N = if (is.null(irows)) nrow(x) else if (!length(irows) \\|\\| ;    identical(max(irows), 0L)) 0L else length(irows)]\n[<none> 602: ;SDenv$.SDall = SDenv$.SD = null.data.table();SDenv$.N = if (is.null(irows)) nrow(x) else if (!length(irows) \\|\\| ;    identical(max(irows), 0L)) 0L else length(irows)]  -> [<end> -575]\n[<end> -575]  -> [<none> 603: ;SDenv$.I = if (!missing(j) && use.I) seq_len(SDenv$.N) else 0L;SDenv$.GRP = 1L;.Call(C_lock, SDenv$.SD);.Call(C_lock, SDenv$.SDall);lockBinding(\".SD\", SDenv);lockBinding(\".SDall\", SDenv);lockBinding(\".N\", SDenv);lockBinding(\".I\", SDenv);lockBinding(\".GRP\", SDenv)]\n[<none> 603: ;SDenv$.I = if (!missing(j) && use.I) seq_len(SDenv$.N) else 0L;SDenv$.GRP = 1L;.Call(C_lock, SDenv$.SD);.Call(C_lock, SDenv$.SDall);lockBinding(\".SD\", SDenv);lockBinding(\".SDall\", SDenv);lockBinding(\".N\", SDenv);lockBinding(\".I\", SDenv);lockBinding(\".GRP\", SDenv)]  -> [<for> 604: ;for (ii in ansvars)]\n[<for> 604: ;for (ii in ansvars)]  -> [<none> 605: ;assign(ii, SDenv$.SDall\\[\\[ii\\]\\], SDenv)]\n[<none> 605: ;assign(ii, SDenv$.SDall\\[\\[ii\\]\\], SDenv)]  -> [<start> -604]\n[<for> 604: ;for (ii in ansvars)] next <- [<start> -604]\n[<start> -604]  -> [<if> 606: ;if (is.name(jsub) && is.null(lhs) && !exists(jsubChar <- as.character(jsub), \n    SDenv, inherits = FALSE))]\n[<if> 606: ;if (is.name(jsub) && is.null(lhs) && !exists(jsubChar <- as.character(jsub), \n    SDenv, inherits = FALSE))] y -> [<none> 607: ;stop(\"j (the 2nd argument inside \\[...\\]) is a single symbol but column name '\", ;    jsubChar, \"' is not found. Perhaps you intended DT\\[, ..\", ;    jsubChar, \"\\]. This difference to data.frame is deliberate and explained in FAQ 1.1.\")]\n[<none> 607: ;stop(\"j (the 2nd argument inside \\[...\\]) is a single symbol but column name '\", ;    jsubChar, \"' is not found. Perhaps you intended DT\\[, ..\", ;    jsubChar, \"\\]. This difference to data.frame is deliberate and explained in FAQ 1.1.\")]  -> [<stop> -607]\n[<if> 606: ;if (is.name(jsub) && is.null(lhs) && !exists(jsubChar <- as.character(jsub), \n    SDenv, inherits = FALSE))] n -> [<end> -606]\n[<end> -606]  -> [<none> 608: ;jval = eval(jsub, SDenv, parent.frame());.Call(C_unlock, jval)]\n[<none> 608: ;jval = eval(jsub, SDenv, parent.frame());.Call(C_unlock, jval)]  -> [<if> 609: ;if (is.null(irows))]\n[<if> 609: ;if (is.null(irows))] y -> [<if> 610: ;if (!is.list(jval))]\n[<if> 610: ;if (!is.list(jval))] y -> [<none> 611: ;jcpy = address(jval) %in% vapply_1c(SDenv$.SD, address)]\n[<none> 611: ;jcpy = address(jval) %in% vapply_1c(SDenv$.SD, address)]  -> [<if> 612: ;if (jcpy)]\n[<if> 612: ;if (jcpy)] y -> [<none> 613: ;jval = copy(jval)]\n[<none> 613: ;jval = copy(jval)]  -> [<end> -612]\n[<if> 612: ;if (jcpy)] n -> [<end> -612]\n[<end> -612]  -> [<end> -610]\n[<if> 610: ;if (!is.list(jval))] n -> [<if> 614: ;if (address(jval) == address(SDenv$.SD))]\n[<if> 614: ;if (address(jval) == address(SDenv$.SD))] y -> [<none> 615: ;jval = copy(jval)]\n[<none> 615: ;jval = copy(jval)]  -> [<end> -614]\n[<if> 614: ;if (address(jval) == address(SDenv$.SD))] n -> [<if> 616: ;if (length(jcpy <- which(vapply_1c(jval, address) %chin% vapply_1c(SDenv, \n    address))))]\n[<if> 616: ;if (length(jcpy <- which(vapply_1c(jval, address) %chin% vapply_1c(SDenv, \n    address))))] y -> [<for> 617: ;for (jidx in jcpy)]\n[<for> 617: ;for (jidx in jcpy)]  -> [<none> 618: ;jval\\[\\[jidx\\]\\] = copy(jval\\[\\[jidx\\]\\])]\n[<none> 618: ;jval\\[\\[jidx\\]\\] = copy(jval\\[\\[jidx\\]\\])]  -> [<start> -617]\n[<for> 617: ;for (jidx in jcpy)] next <- [<start> -617]\n[<start> -617]  -> [<end> -616]\n[<if> 616: ;if (length(jcpy <- which(vapply_1c(jval, address) %chin% vapply_1c(SDenv, \n    address))))] n -> [<if> 619: ;if (is.call(jsub) && jsub\\[\\[1L\\]\\] == \"get\")]\n[<if> 619: ;if (is.call(jsub) && jsub\\[\\[1L\\]\\] == \"get\")] y -> [<none> 620: ;jval = copy(jval)]\n[<none> 620: ;jval = copy(jval)]  -> [<end> -619]\n[<if> 619: ;if (is.call(jsub) && jsub\\[\\[1L\\]\\] == \"get\")] n -> [<end> -619]\n[<end> -619]  -> [<end> -616]\n[<end> -616]  -> [<end> -614]\n[<end> -614]  -> [<end> -610]\n[<end> -610]  -> [<end> -609]\n[<if> 609: ;if (is.null(irows))] n -> [<end> -609]\n[<end> -609]  -> [<if> 621: ;if (!is.null(lhs))]\n[<if> 621: ;if (!is.null(lhs))] y -> [<none> 622: ;.Call(Cassign, x, irows, cols, newnames, jval);return(suppPrint(x))]\n[<none> 622: ;.Call(Cassign, x, irows, cols, newnames, jval);return(suppPrint(x))]  -> [<return> -622]\n[<if> 621: ;if (!is.null(lhs))] n -> [<end> -621]\n[<end> -621]  -> [<if> 623: ;if ((is.call(jsub) && is.list(jval) && jsub\\[\\[1L\\]\\] != \"get\" && \n    !is.object(jval)) \\|\\| !missingby)]\n[<if> 623: ;if ((is.call(jsub) && is.list(jval) && jsub\\[\\[1L\\]\\] != \"get\" && \n    !is.object(jval)) \\|\\| !missingby)] y -> [<if> 624: ;if (!is.null(irows) && (identical(irows, integer(0L)) && !bynull \\|\\| \n    length(irows) && !anyNA(irows) && all(irows == 0L)))]\n[<if> 624: ;if (!is.null(irows) && (identical(irows, integer(0L)) && !bynull \\|\\| \n    length(irows) && !anyNA(irows) && all(irows == 0L)))] y -> [<none> 625: ;jval = lapply(jval, `\\[`, 0L)]\n[<none> 625: ;jval = lapply(jval, `\\[`, 0L)]  -> [<end> -624]\n[<if> 624: ;if (!is.null(irows) && (identical(irows, integer(0L)) && !bynull \\|\\| \n    length(irows) && !anyNA(irows) && all(irows == 0L)))] n -> [<end> -624]\n[<end> -624]  -> [<if> 626: ;if (is.atomic(jval))]\n[<if> 626: ;if (is.atomic(jval))] y -> [<none> 627: ;setattr(jval, \"names\", NULL);jval = list(jval)]\n[<none> 627: ;setattr(jval, \"names\", NULL);jval = list(jval)]  -> [<end> -626]\n[<if> 626: ;if (is.atomic(jval))] n -> [<end> -626]\n[<end> -626]  -> [<if> 628: ;if (!is.null(jvnames) && !all(jvnames == \"\"))]\n[<if> 628: ;if (!is.null(jvnames) && !all(jvnames == \"\"))] y -> [<none> 629: ;setattr(jval, \"names\", jvnames)]\n[<none> 629: ;setattr(jval, \"names\", jvnames)]  -> [<end> -628]\n[<if> 628: ;if (!is.null(jvnames) && !all(jvnames == \"\"))] n -> [<end> -628]\n[<end> -628]  -> [<none> 630: ;jval = as.data.table.list(jval, .named = NULL)]\n[<none> 630: ;jval = as.data.table.list(jval, .named = NULL)]  -> [<end> -623]\n[<if> 623: ;if ((is.call(jsub) && is.list(jval) && jsub\\[\\[1L\\]\\] != \"get\" && \n    !is.object(jval)) \\|\\| !missingby)] n -> [<end> -623]\n[<end> -623]  -> [<if> 631: ;if (is.data.table(jval))]\n[<if> 631: ;if (is.data.table(jval))] y -> [<none> 632: ;setattr(jval, \"class\", class(x))]\n[<none> 632: ;setattr(jval, \"class\", class(x))]  -> [<if> 633: ;if (haskey(x) && all(key(x) %chin% names(jval)) && suppressWarnings(is.sorted(jval, \n    by = key(x))))]\n[<if> 633: ;if (haskey(x) && all(key(x) %chin% names(jval)) && suppressWarnings(is.sorted(jval, \n    by = key(x))))] y -> [<none> 634: ;setattr(jval, \"sorted\", key(x))]\n[<none> 634: ;setattr(jval, \"sorted\", key(x))]  -> [<end> -633]\n[<if> 633: ;if (haskey(x) && all(key(x) %chin% names(jval)) && suppressWarnings(is.sorted(jval, \n    by = key(x))))] n -> [<end> -633]\n[<end> -633]  -> [<if> 635: ;if (any(sapply(jval, is.null)))]\n[<if> 635: ;if (any(sapply(jval, is.null)))] y -> [<none> 636: ;stop(\"Internal error: j has created a data.table result containing a NULL column\")]\n[<none> 636: ;stop(\"Internal error: j has created a data.table result containing a NULL column\")]  -> [<stop> -636]\n[<if> 635: ;if (any(sapply(jval, is.null)))] n -> [<end> -635]\n[<end> -635]  -> [<end> -631]\n[<if> 631: ;if (is.data.table(jval))] n -> [<end> -631]\n[<end> -631]  -> [<none> 637: ;return(jval)]\n[<none> 637: ;return(jval)]  -> [<return> -637]\n[<if> 574: ;if (missingby \\|\\| bynull \\|\\| (!byjoin && !length(byval)))] n -> [<end> -574]\n[<end> -574]  -> [<none> 638: ;o__ = integer()]\n[<none> 638: ;o__ = integer()]  -> [<if> 639: ;if (\".N\" %chin% ansvars)]\n[<if> 639: ;if (\".N\" %chin% ansvars)] y -> [<none> 640: ;stop(\"The column '.N' can't be grouped because it conflicts with the special .N variable. Try setnames(DT,'.N','N') first.\")]\n[<none> 640: ;stop(\"The column '.N' can't be grouped because it conflicts with the special .N variable. Try setnames(DT,'.N','N') first.\")]  -> [<stop> -640]\n[<if> 639: ;if (\".N\" %chin% ansvars)] n -> [<end> -639]\n[<end> -639]  -> [<if> 641: ;if (\".I\" %chin% ansvars)]\n[<if> 641: ;if (\".I\" %chin% ansvars)] y -> [<none> 642: ;stop(\"The column '.I' can't be grouped because it conflicts with the special .I variable. Try setnames(DT,'.I','I') first.\")]\n[<none> 642: ;stop(\"The column '.I' can't be grouped because it conflicts with the special .I variable. Try setnames(DT,'.I','I') first.\")]  -> [<stop> -642]\n[<if> 641: ;if (\".I\" %chin% ansvars)] n -> [<end> -641]\n[<end> -641]  -> [<none> 643: ;SDenv$.iSD = NULL;SDenv$.xSD = NULL;SDenv$print = function(x, ...) {;    base::print(x, ...);    NULL;};SDenv$.SDall = SDenv$.SD = null.data.table();SDenv$.N = vector(\"integer\", 1L);SDenv$.GRP = vector(\"integer\", 1L);SDenv$`-.POSIXt` = function(e1, e2) {;    if (inherits(e2, \"POSIXt\")) {;        if (verbose && !exists(\"done_units_report\", parent.frame())) {;            cat(\"\\nNote: forcing units=\\\"secs\\\" on implicit difftime by group; call difftime explicitly to choose custom units\");            assign(\"done_units_report\", TRUE, parent.frame());        };        return(difftime(e1, e2, units = \"secs\"));    };    else return(base::`-.POSIXt`(e1, e2));}]\n[<none> 643: ;SDenv$.iSD = NULL;SDenv$.xSD = NULL;SDenv$print = function(x, ...) {;    base::print(x, ...);    NULL;};SDenv$.SDall = SDenv$.SD = null.data.table();SDenv$.N = vector(\"integer\", 1L);SDenv$.GRP = vector(\"integer\", 1L);SDenv$`-.POSIXt` = function(e1, e2) {;    if (inherits(e2, \"POSIXt\")) {;        if (verbose && !exists(\"done_units_report\", parent.frame())) {;            cat(\"\\nNote: forcing units=\\\"secs\\\" on implicit difftime by group; call difftime explicitly to choose custom units\");            assign(\"done_units_report\", TRUE, parent.frame());        };        return(difftime(e1, e2, units = \"secs\"));    };    else return(base::`-.POSIXt`(e1, e2));}]  -> [<if> 644: ;if (byjoin)]\n[<if> 644: ;if (byjoin)] y -> [<if> 645: ;if (!is.data.table(i))]\n[<if> 645: ;if (!is.data.table(i))] y -> [<none> 646: ;stop(\"logical error. i is not data.table, but mult='all' and 'by'=.EACHI\")]\n[<none> 646: ;stop(\"logical error. i is not data.table, but mult='all' and 'by'=.EACHI\")]  -> [<stop> -646]\n[<if> 645: ;if (!is.data.table(i))] n -> [<end> -645]\n[<end> -645]  -> [<none> 647: ;byval = i;bynames = if (missing(on)) head(key(x), length(leftcols)) else names(on);allbyvars = NULL;bysameorder = haskey(i) \\|\\| (is.sorted(f__) && ((roll == FALSE) \\|\\| ;    length(f__) == 1L));xjisvars = intersect(av, names_x\\[rightcols\\]);jisvars = if (any(c(\"get\", \"mget\") %chin% av)) names_i else intersect(gsub(\"^i\\[.\\]\", ;    \"\", setdiff(av, xjisvars)), names_i)]\n[<none> 647: ;byval = i;bynames = if (missing(on)) head(key(x), length(leftcols)) else names(on);allbyvars = NULL;bysameorder = haskey(i) \\|\\| (is.sorted(f__) && ((roll == FALSE) \\|\\| ;    length(f__) == 1L));xjisvars = intersect(av, names_x\\[rightcols\\]);jisvars = if (any(c(\"get\", \"mget\") %chin% av)) names_i else intersect(gsub(\"^i\\[.\\]\", ;    \"\", setdiff(av, xjisvars)), names_i)]  -> [<if> 648: ;if (length(jisvars))]\n[<if> 648: ;if (length(jisvars))] y -> [<none> 649: ;tt = min(nrow(i), 1L);SDenv$.iSD = i\\[tt, jisvars, with = FALSE\\]]\n[<none> 649: ;tt = min(nrow(i), 1L);SDenv$.iSD = i\\[tt, jisvars, with = FALSE\\]]  -> [<for> 650: ;for (ii in jisvars)]\n[<for> 650: ;for (ii in jisvars)]  -> [<none> 651: ;assign(ii, SDenv$.iSD\\[\\[ii\\]\\], SDenv);assign(paste0(\"i.\", ii), SDenv$.iSD\\[\\[ii\\]\\], SDenv)]\n[<none> 651: ;assign(ii, SDenv$.iSD\\[\\[ii\\]\\], SDenv);assign(paste0(\"i.\", ii), SDenv$.iSD\\[\\[ii\\]\\], SDenv)]  -> [<start> -650]\n[<for> 650: ;for (ii in jisvars)] next <- [<start> -650]\n[<start> -650]  -> [<end> -648]\n[<if> 648: ;if (length(jisvars))] n -> [<end> -648]\n[<end> -648]  -> [<end> -644]\n[<if> 644: ;if (byjoin)] n -> [<if> 652: ;if (missingby)]\n[<if> 652: ;if (missingby)] y -> [<none> 653: ;stop(\"Internal error: by= is missing\")]\n[<none> 653: ;stop(\"Internal error: by= is missing\")]  -> [<stop> -653]\n[<if> 652: ;if (missingby)] n -> [<end> -652]\n[<end> -652]  -> [<if> 654: ;if (length(byval) && length(byval\\[\\[1L\\]\\]))]\n[<if> 654: ;if (length(byval) && length(byval\\[\\[1L\\]\\]))] y -> [<if> 655: ;if (!bysameorder && isFALSE(byindex))]\n[<if> 655: ;if (!bysameorder && isFALSE(byindex))] y -> [<if> 656: ;if (verbose)]\n[<if> 656: ;if (verbose)] y -> [<none> 657: ;last.started.at = proc.time();cat(\"Finding groups using forderv ... \");flush.console()]\n[<none> 657: ;last.started.at = proc.time();cat(\"Finding groups using forderv ... \");flush.console()]  -> [<end> -656]\n[<if> 656: ;if (verbose)] n -> [<end> -656]\n[<end> -656]  -> [<none> 658: ;o__ = forderv(byval, sort = keyby, retGrp = TRUE);bysameorder = orderedirows && !length(o__)]\n[<none> 658: ;o__ = forderv(byval, sort = keyby, retGrp = TRUE);bysameorder = orderedirows && !length(o__)]  -> [<if> 659: ;if (verbose)]\n[<if> 659: ;if (verbose)] y -> [<none> 660: ;cat(timetaken(last.started.at), \"\\n\");last.started.at = proc.time();cat(\"Finding group sizes from the positions (can be avoided to save RAM) ... \");flush.console()]\n[<none> 660: ;cat(timetaken(last.started.at), \"\\n\");last.started.at = proc.time();cat(\"Finding group sizes from the positions (can be avoided to save RAM) ... \");flush.console()]  -> [<end> -659]\n[<if> 659: ;if (verbose)] n -> [<end> -659]\n[<end> -659]  -> [<none> 661: ;f__ = attr(o__, \"starts\", exact = TRUE);len__ = uniqlengths(f__, xnrow)]\n[<none> 661: ;f__ = attr(o__, \"starts\", exact = TRUE);len__ = uniqlengths(f__, xnrow)]  -> [<if> 662: ;if (verbose)]\n[<if> 662: ;if (verbose)] y -> [<none> 663: ;cat(timetaken(last.started.at), \"\\n\");flush.console()]\n[<none> 663: ;cat(timetaken(last.started.at), \"\\n\");flush.console()]  -> [<end> -662]\n[<if> 662: ;if (verbose)] n -> [<end> -662]\n[<end> -662]  -> [<if> 664: ;if (!bysameorder && !keyby)]\n[<if> 664: ;if (!bysameorder && !keyby)] y -> [<if> 665: ;if (verbose)]\n[<if> 665: ;if (verbose)] y -> [<none> 666: ;last.started.at = proc.time();cat(\"Getting back original order ... \");flush.console()]\n[<none> 666: ;last.started.at = proc.time();cat(\"Getting back original order ... \");flush.console()]  -> [<end> -665]\n[<if> 665: ;if (verbose)] n -> [<end> -665]\n[<end> -665]  -> [<none> 667: ;firstofeachgroup = o__\\[f__\\]]\n[<none> 667: ;firstofeachgroup = o__\\[f__\\]]  -> [<if> 668: ;if (length(origorder <- forderv(firstofeachgroup)))]\n[<if> 668: ;if (length(origorder <- forderv(firstofeachgroup)))] y -> [<none> 669: ;f__ = f__\\[origorder\\];len__ = len__\\[origorder\\]]\n[<none> 669: ;f__ = f__\\[origorder\\];len__ = len__\\[origorder\\]]  -> [<end> -668]\n[<if> 668: ;if (length(origorder <- forderv(firstofeachgroup)))] n -> [<end> -668]\n[<end> -668]  -> [<if> 670: ;if (verbose)]\n[<if> 670: ;if (verbose)] y -> [<none> 671: ;cat(timetaken(last.started.at), \"\\n\");flush.console()]\n[<none> 671: ;cat(timetaken(last.started.at), \"\\n\");flush.console()]  -> [<end> -670]\n[<if> 670: ;if (verbose)] n -> [<end> -670]\n[<end> -670]  -> [<end> -664]\n[<if> 664: ;if (!bysameorder && !keyby)] n -> [<end> -664]\n[<end> -664]  -> [<if> 672: ;if (!orderedirows && !length(o__))]\n[<if> 672: ;if (!orderedirows && !length(o__))] y -> [<none> 673: ;o__ = seq_len(xnrow)]\n[<none> 673: ;o__ = seq_len(xnrow)]  -> [<end> -672]\n[<if> 672: ;if (!orderedirows && !length(o__))] n -> [<end> -672]\n[<end> -672]  -> [<end> -655]\n[<if> 655: ;if (!bysameorder && isFALSE(byindex))] n -> [<if> 674: ;if (verbose)]\n[<if> 674: ;if (verbose)] y -> [<none> 675: ;last.started.at = proc.time()]\n[<none> 675: ;last.started.at = proc.time()]  -> [<end> -674]\n[<if> 674: ;if (verbose)] n -> [<end> -674]\n[<end> -674]  -> [<if> 676: ;if (bysameorder)]\n[<if> 676: ;if (bysameorder)] y -> [<if> 677: ;if (verbose)]\n[<if> 677: ;if (verbose)] y -> [<none> 678: ;cat(\"Finding groups using uniqlist on key ... \");flush.console()]\n[<none> 678: ;cat(\"Finding groups using uniqlist on key ... \");flush.console()]  -> [<end> -677]\n[<if> 677: ;if (verbose)] n -> [<end> -677]\n[<end> -677]  -> [<none> 679: ;f__ = uniqlist(byval)]\n[<none> 679: ;f__ = uniqlist(byval)]  -> [<end> -676]\n[<if> 676: ;if (bysameorder)] n -> [<if> 680: ;if (!is.character(byindex) \\|\\| length(byindex) != 1L)]\n[<if> 680: ;if (!is.character(byindex) \\|\\| length(byindex) != 1L)] y -> [<none> 681: ;stop(\"Internal error: byindex not the index name\")]\n[<none> 681: ;stop(\"Internal error: byindex not the index name\")]  -> [<stop> -681]\n[<if> 680: ;if (!is.character(byindex) \\|\\| length(byindex) != 1L)] n -> [<end> -680]\n[<end> -680]  -> [<if> 682: ;if (verbose)]\n[<if> 682: ;if (verbose)] y -> [<none> 683: ;cat(\"Finding groups using uniqlist on index '\", byindex, \"' ... \", ;    sep = \"\");flush.console()]\n[<none> 683: ;cat(\"Finding groups using uniqlist on index '\", byindex, \"' ... \", ;    sep = \"\");flush.console()]  -> [<end> -682]\n[<if> 682: ;if (verbose)] n -> [<end> -682]\n[<end> -682]  -> [<none> 684: ;o__ = getindex(x, byindex)]\n[<none> 684: ;o__ = getindex(x, byindex)]  -> [<if> 685: ;if (is.null(o__))]\n[<if> 685: ;if (is.null(o__))] y -> [<none> 686: ;stop(\"Internal error: byindex not found\")]\n[<none> 686: ;stop(\"Internal error: byindex not found\")]  -> [<stop> -686]\n[<if> 685: ;if (is.null(o__))] n -> [<end> -685]\n[<end> -685]  -> [<none> 687: ;f__ = uniqlist(byval, order = o__)]\n[<none> 687: ;f__ = uniqlist(byval, order = o__)]  -> [<end> -676]\n[<end> -676]  -> [<if> 688: ;if (verbose)]\n[<if> 688: ;if (verbose)] y -> [<none> 689: ;cat(timetaken(last.started.at), \"\\n\");last.started.at = proc.time();cat(\"Finding group sizes from the positions (can be avoided to save RAM) ... \");flush.console()]\n[<none> 689: ;cat(timetaken(last.started.at), \"\\n\");last.started.at = proc.time();cat(\"Finding group sizes from the positions (can be avoided to save RAM) ... \");flush.console()]  -> [<end> -688]\n[<if> 688: ;if (verbose)] n -> [<end> -688]\n[<end> -688]  -> [<none> 690: ;len__ = uniqlengths(f__, xnrow)]\n[<none> 690: ;len__ = uniqlengths(f__, xnrow)]  -> [<if> 691: ;if (verbose)]\n[<if> 691: ;if (verbose)] y -> [<none> 692: ;cat(timetaken(last.started.at), \"\\n\");flush.console()]\n[<none> 692: ;cat(timetaken(last.started.at), \"\\n\");flush.console()]  -> [<end> -691]\n[<if> 691: ;if (verbose)] n -> [<end> -691]\n[<end> -691]  -> [<end> -655]\n[<end> -655]  -> [<end> -654]\n[<if> 654: ;if (length(byval) && length(byval\\[\\[1L\\]\\]))] n -> [<none> 693: ;f__ = NULL;len__ = 0L;bysameorder = TRUE]\n[<none> 693: ;f__ = NULL;len__ = 0L;bysameorder = TRUE]  -> [<end> -654]\n[<end> -654]  -> [<end> -644]\n[<end> -644]  -> [<if> 694: ;if (length(xcols))]\n[<if> 694: ;if (length(xcols))] y -> [<none> 695: ;SDenv$.SDall = .Call(CsubsetDT, x, if (length(len__)) seq_len(max(len__)) else 0L, ;    xcols)]\n[<none> 695: ;SDenv$.SDall = .Call(CsubsetDT, x, if (length(len__)) seq_len(max(len__)) else 0L, ;    xcols)]  -> [<if> 696: ;if (xdotcols)]\n[<if> 696: ;if (xdotcols)] y -> [<none> 697: ;setattr(SDenv$.SDall, \"names\", ansvars\\[xcolsAns\\])]\n[<none> 697: ;setattr(SDenv$.SDall, \"names\", ansvars\\[xcolsAns\\])]  -> [<end> -696]\n[<if> 696: ;if (xdotcols)] n -> [<end> -696]\n[<end> -696]  -> [<none> 698: ;SDenv$.SD = if (length(non_sdvars)) shallow(SDenv$.SDall, sdvars) else SDenv$.SDall]\n[<none> 698: ;SDenv$.SD = if (length(non_sdvars)) shallow(SDenv$.SDall, sdvars) else SDenv$.SDall]  -> [<end> -694]\n[<if> 694: ;if (length(xcols))] n -> [<end> -694]\n[<end> -694]  -> [<if> 699: ;if (nrow(SDenv$.SDall) == 0L)]\n[<if> 699: ;if (nrow(SDenv$.SDall) == 0L)] y -> [<none> 700: ;setattr(SDenv$.SDall, \"row.names\", c(NA_integer_, 0L));setattr(SDenv$.SD, \"row.names\", c(NA_integer_, 0L))]\n[<none> 700: ;setattr(SDenv$.SDall, \"row.names\", c(NA_integer_, 0L));setattr(SDenv$.SD, \"row.names\", c(NA_integer_, 0L))]  -> [<end> -699]\n[<if> 699: ;if (nrow(SDenv$.SDall) == 0L)] n -> [<end> -699]\n[<end> -699]  -> [<none> 701: ;.Call(C_lock, SDenv$.SD);.Call(C_lock, SDenv$.SDall);lockBinding(\".SD\", SDenv);lockBinding(\".SDall\", SDenv);lockBinding(\".N\", SDenv);lockBinding(\".GRP\", SDenv);lockBinding(\".iSD\", SDenv);GForce = FALSE]\n[<none> 701: ;.Call(C_lock, SDenv$.SD);.Call(C_lock, SDenv$.SDall);lockBinding(\".SD\", SDenv);lockBinding(\".SDall\", SDenv);lockBinding(\".N\", SDenv);lockBinding(\".GRP\", SDenv);lockBinding(\".iSD\", SDenv);GForce = FALSE]  -> [<if> 702: ;if (getOption(\"datatable.optimize\") >= 1L && (is.call(jsub) \\|\\| \n    (is.name(jsub) && as.character(jsub)\\[\\[1L\\]\\] %chin% c(\".SD\", \n        \".N\"))))]\n[<if> 702: ;if (getOption(\"datatable.optimize\") >= 1L && (is.call(jsub) \\|\\| \n    (is.name(jsub) && as.character(jsub)\\[\\[1L\\]\\] %chin% c(\".SD\", \n        \".N\"))))] y -> [<none> 703: ;oldjsub = jsub;funi = 1L;.massageSD = function(jsub) {;    txt = as.list(jsub)\\[-1L\\];    if (length(names(txt)) > 1L) ;        .Call(Csetcharvec, names(txt), 2L, \"\");    fun = txt\\[\\[2L\\]\\];    if (is.call(fun) && fun\\[\\[1L\\]\\] == \"function\") {;        thisfun = paste0(\"..FUN\", funi);        assign(thisfun, eval(fun, SDenv, SDenv), SDenv);        lockBinding(thisfun, SDenv);        txt\\[\\[1L\\]\\] = as.name(thisfun);    };    else {;        if (is.character(fun)) ;            fun = as.name(fun);        txt\\[\\[1L\\]\\] = fun;    };    ans = vector(\"list\", length(sdvars) + 1L);    ans\\[\\[1L\\]\\] = as.name(\"list\");    for (ii in seq_along(sdvars)) {;        txt\\[\\[2L\\]\\] = as.name(sdvars\\[ii\\]);        ans\\[\\[ii + 1L\\]\\] = as.call(txt);    };    jsub = as.call(ans);    jvnames = sdvars;    list(jsub, jvnames);}]\n[<none> 703: ;oldjsub = jsub;funi = 1L;.massageSD = function(jsub) {;    txt = as.list(jsub)\\[-1L\\];    if (length(names(txt)) > 1L) ;        .Call(Csetcharvec, names(txt), 2L, \"\");    fun = txt\\[\\[2L\\]\\];    if (is.call(fun) && fun\\[\\[1L\\]\\] == \"function\") {;        thisfun = paste0(\"..FUN\", funi);        assign(thisfun, eval(fun, SDenv, SDenv), SDenv);        lockBinding(thisfun, SDenv);        txt\\[\\[1L\\]\\] = as.name(thisfun);    };    else {;        if (is.character(fun)) ;            fun = as.name(fun);        txt\\[\\[1L\\]\\] = fun;    };    ans = vector(\"list\", length(sdvars) + 1L);    ans\\[\\[1L\\]\\] = as.name(\"list\");    for (ii in seq_along(sdvars)) {;        txt\\[\\[2L\\]\\] = as.name(sdvars\\[ii\\]);        ans\\[\\[ii + 1L\\]\\] = as.call(txt);    };    jsub = as.call(ans);    jvnames = sdvars;    list(jsub, jvnames);}]  -> [<if> 704: ;if (is.name(jsub))]\n[<if> 704: ;if (is.name(jsub))] y -> [<if> 705: ;if (jsub == \".SD\")]\n[<if> 705: ;if (jsub == \".SD\")] y -> [<none> 706: ;jsub = as.call(c(quote(list), lapply(sdvars, as.name)));jvnames = sdvars]\n[<none> 706: ;jsub = as.call(c(quote(list), lapply(sdvars, as.name)));jvnames = sdvars]  -> [<end> -705]\n[<if> 705: ;if (jsub == \".SD\")] n -> [<end> -705]\n[<end> -705]  -> [<end> -704]\n[<if> 704: ;if (is.name(jsub))] n -> [<if> 707: ;if (length(as.character(jsub\\[\\[1L\\]\\])) == 1L)]\n[<if> 707: ;if (length(as.character(jsub\\[\\[1L\\]\\])) == 1L)] y -> [<none> 708: ;subopt = length(jsub) == 3L && (jsub\\[\\[1L\\]\\] == \"\\[\" \\|\\| jsub\\[\\[1L\\]\\] == ;    \"\\[\\[\") && (is.numeric(jsub\\[\\[3L\\]\\]) \\|\\| jsub\\[\\[3L\\]\\] == \".N\");headopt = jsub\\[\\[1L\\]\\] == \"head\" \\|\\| jsub\\[\\[1L\\]\\] == \"tail\";firstopt = jsub\\[\\[1L\\]\\] == \"first\" \\|\\| jsub\\[\\[1L\\]\\] == \"last\"]\n[<none> 708: ;subopt = length(jsub) == 3L && (jsub\\[\\[1L\\]\\] == \"\\[\" \\|\\| jsub\\[\\[1L\\]\\] == ;    \"\\[\\[\") && (is.numeric(jsub\\[\\[3L\\]\\]) \\|\\| jsub\\[\\[3L\\]\\] == \".N\");headopt = jsub\\[\\[1L\\]\\] == \"head\" \\|\\| jsub\\[\\[1L\\]\\] == \"tail\";firstopt = jsub\\[\\[1L\\]\\] == \"first\" \\|\\| jsub\\[\\[1L\\]\\] == \"last\"]  -> [<if> 709: ;if ((length(jsub) >= 2L && jsub\\[\\[2L\\]\\] == \".SD\") && (subopt \\|\\| \n    headopt \\|\\| firstopt))]\n[<if> 709: ;if ((length(jsub) >= 2L && jsub\\[\\[2L\\]\\] == \".SD\") && (subopt \\|\\| \n    headopt \\|\\| firstopt))] y -> [<if> 710: ;if (headopt && length(jsub) == 2L)]\n[<if> 710: ;if (headopt && length(jsub) == 2L)] y -> [<none> 711: ;jsub\\[\\[\"n\"\\]\\] = 6L]\n[<none> 711: ;jsub\\[\\[\"n\"\\]\\] = 6L]  -> [<end> -710]\n[<if> 710: ;if (headopt && length(jsub) == 2L)] n -> [<end> -710]\n[<end> -710]  -> [<none> 712: ;jsub = as.call(c(quote(list), lapply(sdvars, function(x) {;    jsub\\[\\[2L\\]\\] = as.name(x);    jsub;})));jvnames = sdvars]\n[<none> 712: ;jsub = as.call(c(quote(list), lapply(sdvars, function(x) {;    jsub\\[\\[2L\\]\\] = as.name(x);    jsub;})));jvnames = sdvars]  -> [<end> -709]\n[<if> 709: ;if ((length(jsub) >= 2L && jsub\\[\\[2L\\]\\] == \".SD\") && (subopt \\|\\| \n    headopt \\|\\| firstopt))] n -> [<if> 713: ;if (jsub\\[\\[1L\\]\\] == \"lapply\" && jsub\\[\\[2L\\]\\] == \".SD\" && length(xcols))]\n[<if> 713: ;if (jsub\\[\\[1L\\]\\] == \"lapply\" && jsub\\[\\[2L\\]\\] == \".SD\" && length(xcols))] y -> [<none> 714: ;deparse_ans = .massageSD(jsub);jsub = deparse_ans\\[\\[1L\\]\\];jvnames = deparse_ans\\[\\[2L\\]\\]]\n[<none> 714: ;deparse_ans = .massageSD(jsub);jsub = deparse_ans\\[\\[1L\\]\\];jvnames = deparse_ans\\[\\[2L\\]\\]]  -> [<end> -713]\n[<if> 713: ;if (jsub\\[\\[1L\\]\\] == \"lapply\" && jsub\\[\\[2L\\]\\] == \".SD\" && length(xcols))] n -> [<if> 715: ;if (jsub\\[\\[1L\\]\\] == \"c\" && length(jsub) > 1L)]\n[<if> 715: ;if (jsub\\[\\[1L\\]\\] == \"c\" && length(jsub) > 1L)] y -> [<none> 716: ;optfuns = c(\"max\", \"min\", \"mean\", \"length\", \"sum\", \"median\", ;    \"sd\", \"var\");is_valid = TRUE;any_SD = FALSE;jsubl = as.list.default(jsub);oldjvnames = jvnames;jvnames = NULL]\n[<none> 716: ;optfuns = c(\"max\", \"min\", \"mean\", \"length\", \"sum\", \"median\", ;    \"sd\", \"var\");is_valid = TRUE;any_SD = FALSE;jsubl = as.list.default(jsub);oldjvnames = jvnames;jvnames = NULL]  -> [<for> 717: ;for (i_ in 2L:length(jsubl))]\n[<for> 717: ;for (i_ in 2L:length(jsubl))]  -> [<none> 718: ;this = jsub\\[\\[i_\\]\\]]\n[<none> 718: ;this = jsub\\[\\[i_\\]\\]]  -> [<if> 719: ;if (is.name(this))]\n[<if> 719: ;if (is.name(this))] y -> [<if> 720: ;if (this == \".SD\")]\n[<if> 720: ;if (this == \".SD\")] y -> [<none> 721: ;any_SD = TRUE;jsubl\\[\\[i_\\]\\] = lapply(sdvars, as.name);jvnames = c(jvnames, sdvars)]\n[<none> 721: ;any_SD = TRUE;jsubl\\[\\[i_\\]\\] = lapply(sdvars, as.name);jvnames = c(jvnames, sdvars)]  -> [<end> -720]\n[<if> 720: ;if (this == \".SD\")] n -> [<if> 722: ;if (this == \".N\")]\n[<if> 722: ;if (this == \".N\")] y -> [<none> 723: ;jvnames = c(jvnames, gsub(\"^\\[.\\](\\[N\\])$\", \"\\\\1\", this))]\n[<none> 723: ;jvnames = c(jvnames, gsub(\"^\\[.\\](\\[N\\])$\", \"\\\\1\", this))]  -> [<end> -722]\n[<if> 722: ;if (this == \".N\")] n -> [<none> 724: ;is_valid = FALSE;break]\n[<none> 724: ;is_valid = FALSE;break]  -> [<end> -722]\n[<end> -722]  -> [<end> -720]\n[<end> -720]  -> [<end> -719]\n[<if> 719: ;if (is.name(this))] n -> [<if> 725: ;if (is.call(this))]\n[<if> 725: ;if (is.call(this))] y -> [<if> 726: ;if (this\\[\\[1L\\]\\] == \"lapply\" && this\\[\\[2L\\]\\] == \".SD\" && length(xcols))]\n[<if> 726: ;if (this\\[\\[1L\\]\\] == \"lapply\" && this\\[\\[2L\\]\\] == \".SD\" && length(xcols))] y -> [<none> 727: ;any_SD = TRUE;deparse_ans = .massageSD(this);funi = funi + 1L;jsubl\\[\\[i_\\]\\] = as.list(deparse_ans\\[\\[1L\\]\\]\\[-1L\\]);jvnames = c(jvnames, deparse_ans\\[\\[2L\\]\\])]\n[<none> 727: ;any_SD = TRUE;deparse_ans = .massageSD(this);funi = funi + 1L;jsubl\\[\\[i_\\]\\] = as.list(deparse_ans\\[\\[1L\\]\\]\\[-1L\\]);jvnames = c(jvnames, deparse_ans\\[\\[2L\\]\\])]  -> [<end> -726]\n[<if> 726: ;if (this\\[\\[1L\\]\\] == \"lapply\" && this\\[\\[2L\\]\\] == \".SD\" && length(xcols))] n -> [<if> 728: ;if (this\\[\\[1L\\]\\] == \"list\")]\n[<if> 728: ;if (this\\[\\[1L\\]\\] == \"list\")] y -> [<if> 729: ;if (length(this) > 1L)]\n[<if> 729: ;if (length(this) > 1L)] y -> [<none> 730: ;jl__ = as.list(jsubl\\[\\[i_\\]\\])\\[-1L\\];jn__ = if (is.null(names(jl__))) rep(\"\", length(jl__)) else names(jl__);idx = unlist(lapply(jl__, function(x) is.name(x) && x == \".I\"))]\n[<none> 730: ;jl__ = as.list(jsubl\\[\\[i_\\]\\])\\[-1L\\];jn__ = if (is.null(names(jl__))) rep(\"\", length(jl__)) else names(jl__);idx = unlist(lapply(jl__, function(x) is.name(x) && x == \".I\"))]  -> [<if> 731: ;if (any(idx))]\n[<if> 731: ;if (any(idx))] y -> [<none> 732: ;jn__\\[idx & (jn__ == \"\")\\] = \"I\"]\n[<none> 732: ;jn__\\[idx & (jn__ == \"\")\\] = \"I\"]  -> [<end> -731]\n[<if> 731: ;if (any(idx))] n -> [<end> -731]\n[<end> -731]  -> [<none> 733: ;jvnames = c(jvnames, jn__);jsubl\\[\\[i_\\]\\] = jl__]\n[<none> 733: ;jvnames = c(jvnames, jn__);jsubl\\[\\[i_\\]\\] = jl__]  -> [<end> -729]\n[<if> 729: ;if (length(this) > 1L)] n -> [<end> -729]\n[<end> -729]  -> [<end> -728]\n[<if> 728: ;if (this\\[\\[1L\\]\\] == \"list\")] n -> [<if> 734: ;if (is.call(this) && length(this) > 1L && as.character(this\\[\\[1L\\]\\]) %chin% \n    optfuns)]\n[<if> 734: ;if (is.call(this) && length(this) > 1L && as.character(this\\[\\[1L\\]\\]) %chin% \n    optfuns)] y -> [<none> 735: ;jvnames = c(jvnames, if (is.null(names(jsubl))) \"\" else names(jsubl)\\[i_\\])]\n[<none> 735: ;jvnames = c(jvnames, if (is.null(names(jsubl))) \"\" else names(jsubl)\\[i_\\])]  -> [<end> -734]\n[<if> 734: ;if (is.call(this) && length(this) > 1L && as.character(this\\[\\[1L\\]\\]) %chin% \n    optfuns)] n -> [<if> 736: ;if (length(this) == 3L && (this\\[\\[1L\\]\\] == \"\\[\" \\|\\| this\\[\\[1L\\]\\] == \n    \"head\") && this\\[\\[2L\\]\\] == \".SD\" && (is.numeric(this\\[\\[3L\\]\\]) \\|\\| \n    this\\[\\[3L\\]\\] == \".N\"))]\n[<if> 736: ;if (length(this) == 3L && (this\\[\\[1L\\]\\] == \"\\[\" \\|\\| this\\[\\[1L\\]\\] == \n    \"head\") && this\\[\\[2L\\]\\] == \".SD\" && (is.numeric(this\\[\\[3L\\]\\]) \\|\\| \n    this\\[\\[3L\\]\\] == \".N\"))] y -> [<none> 737: ;any_SD = TRUE;jsubl\\[\\[i_\\]\\] = lapply(sdvars, function(x) {;    this\\[\\[2L\\]\\] = as.name(x);    this;});jvnames = c(jvnames, sdvars)]\n[<none> 737: ;any_SD = TRUE;jsubl\\[\\[i_\\]\\] = lapply(sdvars, function(x) {;    this\\[\\[2L\\]\\] = as.name(x);    this;});jvnames = c(jvnames, sdvars)]  -> [<end> -736]\n[<if> 736: ;if (length(this) == 3L && (this\\[\\[1L\\]\\] == \"\\[\" \\|\\| this\\[\\[1L\\]\\] == \n    \"head\") && this\\[\\[2L\\]\\] == \".SD\" && (is.numeric(this\\[\\[3L\\]\\]) \\|\\| \n    this\\[\\[3L\\]\\] == \".N\"))] n -> [<if> 738: ;if (any(all.vars(this) == \".SD\"))]\n[<if> 738: ;if (any(all.vars(this) == \".SD\"))] y -> [<none> 739: ;is_valid = FALSE;break]\n[<none> 739: ;is_valid = FALSE;break]  -> [<end> -738]\n[<if> 738: ;if (any(all.vars(this) == \".SD\"))] n -> [<none> 740: ;is_valid = FALSE;break]\n[<none> 740: ;is_valid = FALSE;break]  -> [<end> -738]\n[<end> -738]  -> [<end> -736]\n[<end> -736]  -> [<end> -734]\n[<end> -734]  -> [<end> -728]\n[<end> -728]  -> [<end> -726]\n[<end> -726]  -> [<end> -725]\n[<if> 725: ;if (is.call(this))] n -> [<none> 741: ;is_valid = FALSE;break]\n[<none> 741: ;is_valid = FALSE;break]  -> [<end> -725]\n[<end> -725]  -> [<end> -719]\n[<end> -719]  -> [<start> -717]\n[<for> 717: ;for (i_ in 2L:length(jsubl))] next <- [<start> -717]\n[<start> -717]  -> [<if> 742: ;if (!is_valid \\|\\| !any_SD)]\n[<if> 742: ;if (!is_valid \\|\\| !any_SD)] y -> [<none> 743: ;jvnames = oldjvnames;jsub = oldjsub;jsubl = as.list.default(jsubl)]\n[<none> 743: ;jvnames = oldjvnames;jsub = oldjsub;jsubl = as.list.default(jsubl)]  -> [<end> -742]\n[<if> 742: ;if (!is_valid \\|\\| !any_SD)] n -> [<none> 744: ;setattr(jsubl, \"names\", NULL);jsub = as.call(unlist(jsubl, use.names = FALSE));jsub\\[\\[1L\\]\\] = quote(list)]\n[<none> 744: ;setattr(jsubl, \"names\", NULL);jsub = as.call(unlist(jsubl, use.names = FALSE));jsub\\[\\[1L\\]\\] = quote(list)]  -> [<end> -742]\n[<end> -742]  -> [<end> -715]\n[<if> 715: ;if (jsub\\[\\[1L\\]\\] == \"c\" && length(jsub) > 1L)] n -> [<end> -715]\n[<end> -715]  -> [<end> -713]\n[<end> -713]  -> [<end> -709]\n[<end> -709]  -> [<end> -707]\n[<if> 707: ;if (length(as.character(jsub\\[\\[1L\\]\\])) == 1L)] n -> [<end> -707]\n[<end> -707]  -> [<end> -704]\n[<end> -704]  -> [<if> 745: ;if (verbose)]\n[<if> 745: ;if (verbose)] y -> [<if> 746: ;if (!identical(oldjsub, jsub))]\n[<if> 746: ;if (!identical(oldjsub, jsub))] y -> [<none> 747: ;cat(\"lapply optimization changed j from '\", deparse(oldjsub), ;    \"' to '\", deparse(jsub, width.cutoff = 200L, nlines = 1L), ;    \"'\\n\", sep = \"\")]\n[<none> 747: ;cat(\"lapply optimization changed j from '\", deparse(oldjsub), ;    \"' to '\", deparse(jsub, width.cutoff = 200L, nlines = 1L), ;    \"'\\n\", sep = \"\")]  -> [<end> -746]\n[<if> 746: ;if (!identical(oldjsub, jsub))] n -> [<none> 748: ;cat(\"lapply optimization is on, j unchanged as '\", deparse(jsub, ;    width.cutoff = 200L, nlines = 1L), \"'\\n\", sep = \"\")]\n[<none> 748: ;cat(\"lapply optimization is on, j unchanged as '\", deparse(jsub, ;    width.cutoff = 200L, nlines = 1L), \"'\\n\", sep = \"\")]  -> [<end> -746]\n[<end> -746]  -> [<end> -745]\n[<if> 745: ;if (verbose)] n -> [<end> -745]\n[<end> -745]  -> [<none> 749: ;dotN = function(x) is.name(x) && x == \".N\"]\n[<none> 749: ;dotN = function(x) is.name(x) && x == \".N\"]  -> [<if> 750: ;if (getOption(\"datatable.optimize\") >= 2L && !is.data.table(i) && \n    !byjoin && length(f__) && !length(lhs))]\n[<if> 750: ;if (getOption(\"datatable.optimize\") >= 2L && !is.data.table(i) && \n    !byjoin && length(f__) && !length(lhs))] y -> [<if> 751: ;if (!length(ansvars) && !use.I)]\n[<if> 751: ;if (!length(ansvars) && !use.I)] y -> [<none> 752: ;GForce = FALSE]\n[<none> 752: ;GForce = FALSE]  -> [<if> 753: ;if ((is.name(jsub) && jsub == \".N\") \\|\\| (is.call(jsub) && length(jsub) == \n    2L && length(as.character(jsub\\[\\[1L\\]\\])) && as.character(jsub\\[\\[1L\\]\\])\\[1L\\] == \n    \"list\" && length(as.character(jsub\\[\\[2L\\]\\])) && as.character(jsub\\[\\[2L\\]\\])\\[1L\\] == \n    \".N\"))]\n[<if> 753: ;if ((is.name(jsub) && jsub == \".N\") \\|\\| (is.call(jsub) && length(jsub) == \n    2L && length(as.character(jsub\\[\\[1L\\]\\])) && as.character(jsub\\[\\[1L\\]\\])\\[1L\\] == \n    \"list\" && length(as.character(jsub\\[\\[2L\\]\\])) && as.character(jsub\\[\\[2L\\]\\])\\[1L\\] == \n    \".N\"))] y -> [<none> 754: ;GForce = TRUE]\n[<none> 754: ;GForce = TRUE]  -> [<if> 755: ;if (verbose)]\n[<if> 755: ;if (verbose)] y -> [<none> 756: ;cat(\"GForce optimized j to '\", deparse(jsub, width.cutoff = 200L, ;    nlines = 1L), \"'\\n\", sep = \"\")]\n[<none> 756: ;cat(\"GForce optimized j to '\", deparse(jsub, width.cutoff = 200L, ;    nlines = 1L), \"'\\n\", sep = \"\")]  -> [<end> -755]\n[<if> 755: ;if (verbose)] n -> [<end> -755]\n[<end> -755]  -> [<end> -753]\n[<if> 753: ;if ((is.name(jsub) && jsub == \".N\") \\|\\| (is.call(jsub) && length(jsub) == \n    2L && length(as.character(jsub\\[\\[1L\\]\\])) && as.character(jsub\\[\\[1L\\]\\])\\[1L\\] == \n    \"list\" && length(as.character(jsub\\[\\[2L\\]\\])) && as.character(jsub\\[\\[2L\\]\\])\\[1L\\] == \n    \".N\"))] n -> [<end> -753]\n[<end> -753]  -> [<end> -751]\n[<if> 751: ;if (!length(ansvars) && !use.I)] n -> [<none> 757: ;.gforce_ok = function(q) {;    if (dotN(q)) ;        return(TRUE);    if (!(is.call(q) && is.symbol(q\\[\\[1L\\]\\]) && is.symbol(q\\[\\[2L\\]\\]) && ;        (q1c <- as.character(q\\[\\[1L\\]\\])) %chin% gfuns)) ;        return(FALSE);    if (!(q2c <- as.character(q\\[\\[2L\\]\\])) %chin% names(SDenv$.SDall) && ;        q2c != \".I\") ;        return(FALSE);    if ((length(q) == 2L \\|\\| identical(\"na\", substring(names(q)\\[3L\\], ;        1L, 2L))) && (!q1c %chin% c(\"head\", \"tail\"))) ;        return(TRUE);    length(q) == 3L && length(q3 <- q\\[\\[3L\\]\\]) == 1L && is.numeric(q3) && ;        ((q1c %chin% c(\"head\", \"tail\") && q3 == 1L) \\|\\| ((q1c == ;            \"\\[\" \\|\\| q1c == \"\\[\\[\") && q3 > 0L));}]\n[<none> 757: ;.gforce_ok = function(q) {;    if (dotN(q)) ;        return(TRUE);    if (!(is.call(q) && is.symbol(q\\[\\[1L\\]\\]) && is.symbol(q\\[\\[2L\\]\\]) && ;        (q1c <- as.character(q\\[\\[1L\\]\\])) %chin% gfuns)) ;        return(FALSE);    if (!(q2c <- as.character(q\\[\\[2L\\]\\])) %chin% names(SDenv$.SDall) && ;        q2c != \".I\") ;        return(FALSE);    if ((length(q) == 2L \\|\\| identical(\"na\", substring(names(q)\\[3L\\], ;        1L, 2L))) && (!q1c %chin% c(\"head\", \"tail\"))) ;        return(TRUE);    length(q) == 3L && length(q3 <- q\\[\\[3L\\]\\]) == 1L && is.numeric(q3) && ;        ((q1c %chin% c(\"head\", \"tail\") && q3 == 1L) \\|\\| ((q1c == ;            \"\\[\" \\|\\| q1c == \"\\[\\[\") && q3 > 0L));}]  -> [<if> 758: ;if (jsub\\[\\[1L\\]\\] == \"list\")]\n[<if> 758: ;if (jsub\\[\\[1L\\]\\] == \"list\")] y -> [<none> 759: ;GForce = TRUE]\n[<none> 759: ;GForce = TRUE]  -> [<for> 760: ;for (ii in seq.int(from = 2L, length.out = length(jsub) - 1L))]\n[<for> 760: ;for (ii in seq.int(from = 2L, length.out = length(jsub) - 1L))]  -> [<if> 761: ;if (!.gforce_ok(jsub\\[\\[ii\\]\\]))]\n[<if> 761: ;if (!.gforce_ok(jsub\\[\\[ii\\]\\]))] y -> [<none> 762: ;GForce = FALSE;break]\n[<none> 762: ;GForce = FALSE;break]  -> [<end> -761]\n[<if> 761: ;if (!.gforce_ok(jsub\\[\\[ii\\]\\]))] n -> [<end> -761]\n[<end> -761]  -> [<start> -760]\n[<for> 760: ;for (ii in seq.int(from = 2L, length.out = length(jsub) - 1L))] next <- [<start> -760]\n[<start> -760]  -> [<end> -758]\n[<if> 758: ;if (jsub\\[\\[1L\\]\\] == \"list\")] n -> [<none> 763: ;GForce = .gforce_ok(jsub)]\n[<none> 763: ;GForce = .gforce_ok(jsub)]  -> [<end> -758]\n[<end> -758]  -> [<if> 764: ;if (GForce)]\n[<if> 764: ;if (GForce)] y -> [<if> 765: ;if (jsub\\[\\[1L\\]\\] == \"list\")]\n[<if> 765: ;if (jsub\\[\\[1L\\]\\] == \"list\")] y -> [<for> 766: ;for (ii in seq_along(jsub)\\[-1L\\])]\n[<for> 766: ;for (ii in seq_along(jsub)\\[-1L\\])]  -> [<if> 767: ;if (dotN(jsub\\[\\[ii\\]\\]))]\n[<if> 767: ;if (dotN(jsub\\[\\[ii\\]\\]))] y -> [<none> 768: ;next]\n[<none> 768: ;next]  -> [<end> -767]\n[<if> 767: ;if (dotN(jsub\\[\\[ii\\]\\]))] n -> [<end> -767]\n[<end> -767]  -> [<none> 769: ;jsub\\[\\[ii\\]\\]\\[\\[1L\\]\\] = as.name(paste0(\"g\", jsub\\[\\[ii\\]\\]\\[\\[1L\\]\\]))]\n[<none> 769: ;jsub\\[\\[ii\\]\\]\\[\\[1L\\]\\] = as.name(paste0(\"g\", jsub\\[\\[ii\\]\\]\\[\\[1L\\]\\]))]  -> [<if> 770: ;if (length(jsub\\[\\[ii\\]\\]) == 3L)]\n[<if> 770: ;if (length(jsub\\[\\[ii\\]\\]) == 3L)] y -> [<none> 771: ;jsub\\[\\[ii\\]\\]\\[\\[3L\\]\\] = eval(jsub\\[\\[ii\\]\\]\\[\\[3L\\]\\], parent.frame())]\n[<none> 771: ;jsub\\[\\[ii\\]\\]\\[\\[3L\\]\\] = eval(jsub\\[\\[ii\\]\\]\\[\\[3L\\]\\], parent.frame())]  -> [<end> -770]\n[<if> 770: ;if (length(jsub\\[\\[ii\\]\\]) == 3L)] n -> [<end> -770]\n[<end> -770]  -> [<start> -766]\n[<for> 766: ;for (ii in seq_along(jsub)\\[-1L\\])] next <- [<start> -766]\n[<start> -766]  -> [<end> -765]\n[<if> 765: ;if (jsub\\[\\[1L\\]\\] == \"list\")] n -> [<none> 772: ;jsub\\[\\[1L\\]\\] = as.name(paste0(\"g\", jsub\\[\\[1L\\]\\]))]\n[<none> 772: ;jsub\\[\\[1L\\]\\] = as.name(paste0(\"g\", jsub\\[\\[1L\\]\\]))]  -> [<if> 773: ;if (length(jsub) == 3L)]\n[<if> 773: ;if (length(jsub) == 3L)] y -> [<none> 774: ;jsub\\[\\[3L\\]\\] = eval(jsub\\[\\[3L\\]\\], parent.frame())]\n[<none> 774: ;jsub\\[\\[3L\\]\\] = eval(jsub\\[\\[3L\\]\\], parent.frame())]  -> [<end> -773]\n[<if> 773: ;if (length(jsub) == 3L)] n -> [<end> -773]\n[<end> -773]  -> [<end> -765]\n[<end> -765]  -> [<if> 775: ;if (verbose)]\n[<if> 775: ;if (verbose)] y -> [<none> 776: ;cat(\"GForce optimized j to '\", deparse(jsub, width.cutoff = 200L, ;    nlines = 1L), \"'\\n\", sep = \"\")]\n[<none> 776: ;cat(\"GForce optimized j to '\", deparse(jsub, width.cutoff = 200L, ;    nlines = 1L), \"'\\n\", sep = \"\")]  -> [<end> -775]\n[<if> 775: ;if (verbose)] n -> [<end> -775]\n[<end> -775]  -> [<end> -764]\n[<if> 764: ;if (GForce)] n -> [<if> 777: ;if (verbose)]\n[<if> 777: ;if (verbose)] y -> [<none> 778: ;cat(\"GForce is on, left j unchanged\\n\")]\n[<none> 778: ;cat(\"GForce is on, left j unchanged\\n\")]  -> [<end> -777]\n[<if> 777: ;if (verbose)] n -> [<end> -777]\n[<end> -777]  -> [<end> -764]\n[<end> -764]  -> [<end> -751]\n[<end> -751]  -> [<end> -750]\n[<if> 750: ;if (getOption(\"datatable.optimize\") >= 2L && !is.data.table(i) && \n    !byjoin && length(f__) && !length(lhs))] n -> [<end> -750]\n[<end> -750]  -> [<if> 779: ;if (!GForce && !is.name(jsub))]\n[<if> 779: ;if (!GForce && !is.name(jsub))] y -> [<none> 780: ;nomeanopt = FALSE;oldjsub = jsub]\n[<none> 780: ;nomeanopt = FALSE;oldjsub = jsub]  -> [<if> 781: ;if (jsub\\[\\[1L\\]\\] == \"list\")]\n[<if> 781: ;if (jsub\\[\\[1L\\]\\] == \"list\")] y -> [<none> 782: ;todo = sapply(jsub, function(x) {;    is.call(x) && is.symbol(x\\[\\[1L\\]\\]) && x\\[\\[1L\\]\\] == \"mean\";})]\n[<none> 782: ;todo = sapply(jsub, function(x) {;    is.call(x) && is.symbol(x\\[\\[1L\\]\\]) && x\\[\\[1L\\]\\] == \"mean\";})]  -> [<if> 783: ;if (any(todo))]\n[<if> 783: ;if (any(todo))] y -> [<none> 784: ;w = which(todo);jsub\\[w\\] = lapply(jsub\\[w\\], .optmean)]\n[<none> 784: ;w = which(todo);jsub\\[w\\] = lapply(jsub\\[w\\], .optmean)]  -> [<end> -783]\n[<if> 783: ;if (any(todo))] n -> [<end> -783]\n[<end> -783]  -> [<end> -781]\n[<if> 781: ;if (jsub\\[\\[1L\\]\\] == \"list\")] n -> [<if> 785: ;if (jsub\\[\\[1L\\]\\] == \"mean\")]\n[<if> 785: ;if (jsub\\[\\[1L\\]\\] == \"mean\")] y -> [<none> 786: ;jsub = .optmean(jsub)]\n[<none> 786: ;jsub = .optmean(jsub)]  -> [<end> -785]\n[<if> 785: ;if (jsub\\[\\[1L\\]\\] == \"mean\")] n -> [<end> -785]\n[<end> -785]  -> [<end> -781]\n[<end> -781]  -> [<if> 787: ;if (nomeanopt)]\n[<if> 787: ;if (nomeanopt)] y -> [<none> 788: ;warning(\"Unable to optimize call to mean() and could be very slow. You must name 'na.rm' like that otherwise if you do mean(x,TRUE) the TRUE is taken to mean 'trim' which is the 2nd argument of mean. 'trim' is not yet optimized.\", ;    immediate. = TRUE)]\n[<none> 788: ;warning(\"Unable to optimize call to mean() and could be very slow. You must name 'na.rm' like that otherwise if you do mean(x,TRUE) the TRUE is taken to mean 'trim' which is the 2nd argument of mean. 'trim' is not yet optimized.\", ;    immediate. = TRUE)]  -> [<end> -787]\n[<if> 787: ;if (nomeanopt)] n -> [<end> -787]\n[<end> -787]  -> [<if> 789: ;if (verbose)]\n[<if> 789: ;if (verbose)] y -> [<if> 790: ;if (!identical(oldjsub, jsub))]\n[<if> 790: ;if (!identical(oldjsub, jsub))] y -> [<none> 791: ;cat(\"Old mean optimization changed j from '\", deparse(oldjsub), ;    \"' to '\", deparse(jsub, width.cutoff = 200L, nlines = 1L), ;    \"'\\n\", sep = \"\")]\n[<none> 791: ;cat(\"Old mean optimization changed j from '\", deparse(oldjsub), ;    \"' to '\", deparse(jsub, width.cutoff = 200L, nlines = 1L), ;    \"'\\n\", sep = \"\")]  -> [<end> -790]\n[<if> 790: ;if (!identical(oldjsub, jsub))] n -> [<none> 792: ;cat(\"Old mean optimization is on, left j unchanged.\\n\")]\n[<none> 792: ;cat(\"Old mean optimization is on, left j unchanged.\\n\")]  -> [<end> -790]\n[<end> -790]  -> [<end> -789]\n[<if> 789: ;if (verbose)] n -> [<end> -789]\n[<end> -789]  -> [<none> 793: ;assign(\"Cfastmean\", Cfastmean, SDenv)]\n[<none> 793: ;assign(\"Cfastmean\", Cfastmean, SDenv)]  -> [<end> -779]\n[<if> 779: ;if (!GForce && !is.name(jsub))] n -> [<end> -779]\n[<end> -779]  -> [<end> -702]\n[<if> 702: ;if (getOption(\"datatable.optimize\") >= 1L && (is.call(jsub) \\|\\| \n    (is.name(jsub) && as.character(jsub)\\[\\[1L\\]\\] %chin% c(\".SD\", \n        \".N\"))))] n -> [<if> 794: ;if (verbose)]\n[<if> 794: ;if (verbose)] y -> [<if> 795: ;if (getOption(\"datatable.optimize\") < 1L)]\n[<if> 795: ;if (getOption(\"datatable.optimize\") < 1L)] y -> [<none> 796: ;cat(\"All optimizations are turned off\\n\")]\n[<none> 796: ;cat(\"All optimizations are turned off\\n\")]  -> [<end> -795]\n[<if> 795: ;if (getOption(\"datatable.optimize\") < 1L)] n -> [<none> 797: ;cat(\"Optimization is on but left j unchanged (single plain symbol): '\", ;    deparse(jsub, width.cutoff = 200L, nlines = 1L), \"'\\n\", sep = \"\")]\n[<none> 797: ;cat(\"Optimization is on but left j unchanged (single plain symbol): '\", ;    deparse(jsub, width.cutoff = 200L, nlines = 1L), \"'\\n\", sep = \"\")]  -> [<end> -795]\n[<end> -795]  -> [<end> -794]\n[<if> 794: ;if (verbose)] n -> [<end> -794]\n[<end> -794]  -> [<end> -702]\n[<end> -702]  -> [<if> 798: ;if (byjoin)]\n[<if> 798: ;if (byjoin)] y -> [<none> 799: ;groups = i;grpcols = leftcols;jiscols = chmatch(jisvars, names_i);xjiscols = chmatch(xjisvars, names_x);SDenv$.xSD = x\\[min(nrow(i), 1L), xjisvars, with = FALSE\\]]\n[<none> 799: ;groups = i;grpcols = leftcols;jiscols = chmatch(jisvars, names_i);xjiscols = chmatch(xjisvars, names_x);SDenv$.xSD = x\\[min(nrow(i), 1L), xjisvars, with = FALSE\\]]  -> [<if> 800: ;if (!missing(on))]\n[<if> 800: ;if (!missing(on))] y -> [<none> 801: ;o__ = xo]\n[<none> 801: ;o__ = xo]  -> [<end> -800]\n[<if> 800: ;if (!missing(on))] n -> [<none> 802: ;o__ = integer(0L)]\n[<none> 802: ;o__ = integer(0L)]  -> [<end> -800]\n[<end> -800]  -> [<end> -798]\n[<if> 798: ;if (byjoin)] n -> [<none> 803: ;groups = byval;grpcols = seq_along(byval);jiscols = NULL;xjiscols = NULL]\n[<none> 803: ;groups = byval;grpcols = seq_along(byval);jiscols = NULL;xjiscols = NULL]  -> [<end> -798]\n[<end> -798]  -> [<none> 804: ;lockBinding(\".xSD\", SDenv);grporder = o__]\n[<none> 804: ;lockBinding(\".xSD\", SDenv);grporder = o__]  -> [<if> 805: ;if (length(irows) && !isTRUE(irows) && !GForce)]\n[<if> 805: ;if (length(irows) && !isTRUE(irows) && !GForce)] y -> [<if> 806: ;if (length(o__) && length(irows) != length(o__))]\n[<if> 806: ;if (length(o__) && length(irows) != length(o__))] y -> [<none> 807: ;stop(\"Internal error: length(irows)!=length(o__)\")]\n[<none> 807: ;stop(\"Internal error: length(irows)!=length(o__)\")]  -> [<stop> -807]\n[<if> 806: ;if (length(o__) && length(irows) != length(o__))] n -> [<end> -806]\n[<end> -806]  -> [<none> 808: ;o__ = if (length(o__)) irows\\[o__\\] else irows]\n[<none> 808: ;o__ = if (length(o__)) irows\\[o__\\] else irows]  -> [<end> -805]\n[<if> 805: ;if (length(irows) && !isTRUE(irows) && !GForce)] n -> [<end> -805]\n[<end> -805]  -> [<if> 809: ;if (is.null(lhs))]\n[<if> 809: ;if (is.null(lhs))] y -> [<none> 810: ;cols = NULL]\n[<none> 810: ;cols = NULL]  -> [<end> -809]\n[<if> 809: ;if (is.null(lhs))] n -> [<end> -809]\n[<end> -809]  -> [<if> 811: ;if (!length(f__))]\n[<if> 811: ;if (!length(f__))] y -> [<none> 812: ;f__ = len__ = 0L]\n[<none> 812: ;f__ = len__ = 0L]  -> [<end> -811]\n[<if> 811: ;if (!length(f__))] n -> [<end> -811]\n[<end> -811]  -> [<if> 813: ;if (verbose)]\n[<if> 813: ;if (verbose)] y -> [<none> 814: ;last.started.at = proc.time();cat(\"Making each group and running j (GForce \", GForce, \") ... \", ;    sep = \"\");flush.console()]\n[<none> 814: ;last.started.at = proc.time();cat(\"Making each group and running j (GForce \", GForce, \") ... \", ;    sep = \"\");flush.console()]  -> [<end> -813]\n[<if> 813: ;if (verbose)] n -> [<end> -813]\n[<end> -813]  -> [<if> 815: ;if (GForce)]\n[<if> 815: ;if (GForce)] y -> [<none> 816: ;thisEnv = new.env()]\n[<none> 816: ;thisEnv = new.env()]  -> [<for> 817: ;for (ii in ansvars)]\n[<for> 817: ;for (ii in ansvars)]  -> [<none> 818: ;assign(ii, x\\[\\[ii\\]\\], thisEnv)]\n[<none> 818: ;assign(ii, x\\[\\[ii\\]\\], thisEnv)]  -> [<start> -817]\n[<for> 817: ;for (ii in ansvars)] next <- [<start> -817]\n[<start> -817]  -> [<none> 819: ;assign(\".N\", len__, thisEnv)]\n[<none> 819: ;assign(\".N\", len__, thisEnv)]  -> [<if> 820: ;if (use.I)]\n[<if> 820: ;if (use.I)] y -> [<none> 821: ;assign(\".I\", seq_len(nrow(x)), thisEnv)]\n[<none> 821: ;assign(\".I\", seq_len(nrow(x)), thisEnv)]  -> [<end> -820]\n[<if> 820: ;if (use.I)] n -> [<end> -820]\n[<end> -820]  -> [<none> 822: ;ans = gforce(thisEnv, jsub, o__, f__, len__, irows);gi = if (length(o__)) o__\\[f__\\] else f__;g = lapply(grpcols, function(i) groups\\[\\[i\\]\\]\\[gi\\]);ans = c(g, ans)]\n[<none> 822: ;ans = gforce(thisEnv, jsub, o__, f__, len__, irows);gi = if (length(o__)) o__\\[f__\\] else f__;g = lapply(grpcols, function(i) groups\\[\\[i\\]\\]\\[gi\\]);ans = c(g, ans)]  -> [<end> -815]\n[<if> 815: ;if (GForce)] n -> [<none> 823: ;ans = .Call(Cdogroups, x, xcols, groups, grpcols, jiscols, xjiscols, ;    grporder, o__, f__, len__, jsub, SDenv, cols, newnames, !missing(on), ;    verbose)]\n[<none> 823: ;ans = .Call(Cdogroups, x, xcols, groups, grpcols, jiscols, xjiscols, ;    grporder, o__, f__, len__, jsub, SDenv, cols, newnames, !missing(on), ;    verbose)]  -> [<end> -815]\n[<end> -815]  -> [<if> 824: ;if (verbose)]\n[<if> 824: ;if (verbose)] y -> [<none> 825: ;cat(timetaken(last.started.at), \"\\n\");flush.console()]\n[<none> 825: ;cat(timetaken(last.started.at), \"\\n\");flush.console()]  -> [<end> -824]\n[<if> 824: ;if (verbose)] n -> [<end> -824]\n[<end> -824]  -> [<if> 826: ;if (!is.null(lhs))]\n[<if> 826: ;if (!is.null(lhs))] y -> [<if> 827: ;if (any(names_x\\[cols\\] %chin% key(x)))]\n[<if> 827: ;if (any(names_x\\[cols\\] %chin% key(x)))] y -> [<none> 828: ;setkey(x, NULL)]\n[<none> 828: ;setkey(x, NULL)]  -> [<end> -827]\n[<if> 827: ;if (any(names_x\\[cols\\] %chin% key(x)))] n -> [<end> -827]\n[<end> -827]  -> [<none> 829: ;attrs = attr(x, \"index\", exact = TRUE);skeys = names(attributes(attrs))]\n[<none> 829: ;attrs = attr(x, \"index\", exact = TRUE);skeys = names(attributes(attrs))]  -> [<if> 830: ;if (!is.null(skeys))]\n[<if> 830: ;if (!is.null(skeys))] y -> [<none> 831: ;hits = unlist(lapply(paste0(\"__\", names_x\\[cols\\]), function(x) grep(x, ;    skeys, fixed = TRUE)));hits = skeys\\[unique(hits)\\]]\n[<none> 831: ;hits = unlist(lapply(paste0(\"__\", names_x\\[cols\\]), function(x) grep(x, ;    skeys, fixed = TRUE)));hits = skeys\\[unique(hits)\\]]  -> [<for> 832: ;for (i in seq_along(hits))]\n[<for> 832: ;for (i in seq_along(hits))]  -> [<none> 833: ;setattr(attrs, hits\\[i\\], NULL)]\n[<none> 833: ;setattr(attrs, hits\\[i\\], NULL)]  -> [<start> -832]\n[<for> 832: ;for (i in seq_along(hits))] next <- [<start> -832]\n[<start> -832]  -> [<end> -830]\n[<if> 830: ;if (!is.null(skeys))] n -> [<end> -830]\n[<end> -830]  -> [<if> 834: ;if (keyby)]\n[<if> 834: ;if (keyby)] y -> [<none> 835: ;cnames = as.character(bysubl)\\[-1L\\];cnames = gsub(\"^`\\|`$\", \"\", cnames)]\n[<none> 835: ;cnames = as.character(bysubl)\\[-1L\\];cnames = gsub(\"^`\\|`$\", \"\", cnames)]  -> [<if> 836: ;if (all(cnames %chin% names_x))]\n[<if> 836: ;if (all(cnames %chin% names_x))] y -> [<if> 837: ;if (verbose)]\n[<if> 837: ;if (verbose)] y -> [<none> 838: ;last.started.at = proc.time();cat(\"setkey() after the := with keyby= ... \");flush.console()]\n[<none> 838: ;last.started.at = proc.time();cat(\"setkey() after the := with keyby= ... \");flush.console()]  -> [<end> -837]\n[<if> 837: ;if (verbose)] n -> [<end> -837]\n[<end> -837]  -> [<none> 839: ;setkeyv(x, cnames)]\n[<none> 839: ;setkeyv(x, cnames)]  -> [<if> 840: ;if (verbose)]\n[<if> 840: ;if (verbose)] y -> [<none> 841: ;cat(timetaken(last.started.at), \"\\n\");flush.console()]\n[<none> 841: ;cat(timetaken(last.started.at), \"\\n\");flush.console()]  -> [<end> -840]\n[<if> 840: ;if (verbose)] n -> [<end> -840]\n[<end> -840]  -> [<end> -836]\n[<if> 836: ;if (all(cnames %chin% names_x))] n -> [<none> 842: ;warning(\"The setkey() normally performed by keyby= has been skipped (as if by= was used) because := is being used together with keyby= but the keyby= contains some expressions. To avoid this warning, use by= instead, or provide existing column names to keyby=.\\n\")]\n[<none> 842: ;warning(\"The setkey() normally performed by keyby= has been skipped (as if by= was used) because := is being used together with keyby= but the keyby= contains some expressions. To avoid this warning, use by= instead, or provide existing column names to keyby=.\\n\")]  -> [<end> -836]\n[<end> -836]  -> [<end> -834]\n[<if> 834: ;if (keyby)] n -> [<end> -834]\n[<end> -834]  -> [<none> 843: ;return(suppPrint(x))]\n[<none> 843: ;return(suppPrint(x))]  -> [<return> -843]\n[<if> 826: ;if (!is.null(lhs))] n -> [<end> -826]\n[<end> -826]  -> [<if> 844: ;if (is.null(ans))]\n[<if> 844: ;if (is.null(ans))] y -> [<none> 845: ;ans = as.data.table.list(lapply(groups, \"\\[\", 0L));setnames(ans, seq_along(bynames), bynames);return(ans)]\n[<none> 845: ;ans = as.data.table.list(lapply(groups, \"\\[\", 0L));setnames(ans, seq_along(bynames), bynames);return(ans)]  -> [<return> -845]\n[<if> 844: ;if (is.null(ans))] n -> [<end> -844]\n[<end> -844]  -> [<none> 846: ;setattr(ans, \"row.names\", .set_row_names(length(ans\\[\\[1L\\]\\])));setattr(ans, \"class\", class(x))]\n[<none> 846: ;setattr(ans, \"row.names\", .set_row_names(length(ans\\[\\[1L\\]\\])));setattr(ans, \"class\", class(x))]  -> [<if> 847: ;if (is.null(names(ans)))]\n[<if> 847: ;if (is.null(names(ans)))] y -> [<if> 848: ;if (is.null(jvnames))]\n[<if> 848: ;if (is.null(jvnames))] y -> [<none> 849: ;jvnames = character(length(ans) - length(bynames))]\n[<none> 849: ;jvnames = character(length(ans) - length(bynames))]  -> [<end> -848]\n[<if> 848: ;if (is.null(jvnames))] n -> [<end> -848]\n[<end> -848]  -> [<if> 850: ;if (length(bynames) + length(jvnames) != length(ans))]\n[<if> 850: ;if (length(bynames) + length(jvnames) != length(ans))] y -> [<none> 851: ;stop(\"Internal error: jvnames is length \", length(jvnames), \" but ans is \", ;    length(ans), \" and bynames is \", length(bynames))]\n[<none> 851: ;stop(\"Internal error: jvnames is length \", length(jvnames), \" but ans is \", ;    length(ans), \" and bynames is \", length(bynames))]  -> [<stop> -851]\n[<if> 850: ;if (length(bynames) + length(jvnames) != length(ans))] n -> [<end> -850]\n[<end> -850]  -> [<none> 852: ;ww = which(jvnames == \"\")]\n[<none> 852: ;ww = which(jvnames == \"\")]  -> [<if> 853: ;if (any(ww))]\n[<if> 853: ;if (any(ww))] y -> [<none> 854: ;jvnames\\[ww\\] = paste0(\"V\", ww)]\n[<none> 854: ;jvnames\\[ww\\] = paste0(\"V\", ww)]  -> [<end> -853]\n[<if> 853: ;if (any(ww))] n -> [<end> -853]\n[<end> -853]  -> [<none> 855: ;setattr(ans, \"names\", c(bynames, jvnames))]\n[<none> 855: ;setattr(ans, \"names\", c(bynames, jvnames))]  -> [<end> -847]\n[<if> 847: ;if (is.null(names(ans)))] n -> [<none> 856: ;setnames(ans, seq_along(bynames), bynames)]\n[<none> 856: ;setnames(ans, seq_along(bynames), bynames)]  -> [<end> -847]\n[<end> -847]  -> [<if> 857: ;if (byjoin && keyby && !bysameorder)]\n[<if> 857: ;if (byjoin && keyby && !bysameorder)] y -> [<if> 858: ;if (verbose)]\n[<if> 858: ;if (verbose)] y -> [<none> 859: ;last.started.at = proc.time();cat(\"setkey() afterwards for keyby=.EACHI ... \");flush.console()]\n[<none> 859: ;last.started.at = proc.time();cat(\"setkey() afterwards for keyby=.EACHI ... \");flush.console()]  -> [<end> -858]\n[<if> 858: ;if (verbose)] n -> [<end> -858]\n[<end> -858]  -> [<none> 860: ;setkeyv(ans, names(ans)\\[seq_along(byval)\\])]\n[<none> 860: ;setkeyv(ans, names(ans)\\[seq_along(byval)\\])]  -> [<if> 861: ;if (verbose)]\n[<if> 861: ;if (verbose)] y -> [<none> 862: ;cat(timetaken(last.started.at), \"\\n\");flush.console()]\n[<none> 862: ;cat(timetaken(last.started.at), \"\\n\");flush.console()]  -> [<end> -861]\n[<if> 861: ;if (verbose)] n -> [<end> -861]\n[<end> -861]  -> [<end> -857]\n[<if> 857: ;if (byjoin && keyby && !bysameorder)] n -> [<if> 863: ;if (keyby \\|\\| (haskey(x) && bysameorder && (byjoin \\|\\| (length(allbyvars) && \n    identical(allbyvars, head(key(x), length(allbyvars)))))))]\n[<if> 863: ;if (keyby \\|\\| (haskey(x) && bysameorder && (byjoin \\|\\| (length(allbyvars) && \n    identical(allbyvars, head(key(x), length(allbyvars)))))))] y -> [<none> 864: ;setattr(ans, \"sorted\", names(ans)\\[seq_along(grpcols)\\])]\n[<none> 864: ;setattr(ans, \"sorted\", names(ans)\\[seq_along(grpcols)\\])]  -> [<end> -863]\n[<if> 863: ;if (keyby \\|\\| (haskey(x) && bysameorder && (byjoin \\|\\| (length(allbyvars) && \n    identical(allbyvars, head(key(x), length(allbyvars)))))))] n -> [<end> -863]\n[<end> -863]  -> [<end> -857]\n[<end> -857]  -> [<none> 865: ;setalloccol(ans)]\n[<none> 865: ;setalloccol(ans)]  -> [<return> 866]"

I believe the users should be able to decide themselves if a size is too big, or have a parameter to force this freedom. If big charts must be dismissed, it would be better to have an error than silent behavior.

Thanks for the great work.

Errors with webshot, consider switch to webshot2?

In order to use nomnoml in Rmarkdown documents, the package webshot and a local binary of PhantomJS are needed.

I followed relevant instructions, but in spite of some efforts with troubleshooting, I could not get this setup to work, getting errors such as webshot.js returned failure value: 1.

The point of this issue, however, is not about troubleshooting webshot.

Eventually, I found an easy solution: find and replace all webshot:: with webshot2:: in the nomnoml package, adjust the function stop_if_no_phantomjs, and the messages included in zzz.R.... and voilà, everything started to work beautifully.

As it appears that webshot2 is ultimately a more modern implementation of webshot based on a different and more reliable stack, perhaps switching to webshot2 would be a net benefit for most users?

I could see also the alternative path of adding a parameter for selecting which tool to use for screenshots, and allow for an easy switch between the two. I'm not sure what would be the best way to name such a parameter, as a user may be confused by the idea that screenshotting is taking place in the background. But ultimately, a "screenshot" parameter, with valid values "webshot" and "webshot2" may still be the most consistent approach, as it would still allow for alternative options if other tools appear down the line.

Especially if the idea is just to replace webshot with webshot2 the changes are seemingly relatively trivial, even if somewhat opinionated (e.g. would there be a need for something comparable to stop_if_no_phantomjs, or would we leave it to webshot2 to let the user know if something is missing?). Because of such choices, I guess it would be probably easier to deal with this on your side (of course, should you find any merit in this issue), but I remain available for submitting a pull request if you feel this may be useful. Thank you for you attention and for the great tool.

width and height arguments to `nomnoml()` problems

The width and height arguments to nomnoml() are described here

nomnoml/R/nomnoml.R

Lines 20 to 22 in d377a81

#' @param width Optional width in pixels for the exported 'png'.
#'
#' @param height Optional height in pixels for the exported 'png'.
as being measured in pixels. Since they are htmlwidgets measurements that's how numerical values will be interpreted, but string values using CSS units (e.g. "3in") will also be accepted.

(There's also an issue if they are specified in help page example code. It works fine for users running examples, but the pkgdown display will give an error if a string size is used and will interpret numerical values as inches instead of pixels. This is a pkgdown issue, as described here: r-lib/pkgdown#2062. It isn't a problem in vignettes, only help pages.)

svg output ?

nomnoml.com proposes svg output, would it be possible to have it available with this package ?

Display diagram vertically?

Hi Javier,

Thanks for the great uml interface. How can I make a diagram display vertically (rather than horizontally as in your "[Hello]-[world]" example) from rmarkdown?

Here's my example:

---
output:
  github_document:
    fig_width: 4
    fig_height: 1
always_allow_html: yes
---

```{r setup, include = FALSE}
library(nomnoml)
knitr::opts_chunk$set(eval = TRUE, echo = F, warning = F)
knitr::opts_chunk$set(fig.path = "tools/readme/", dev = "png")

```

```{nomnoml nomnoml-decorator, width = 4, height = 10}

#fontSize: 7
#spacing: 50
#padding: 20
#stroke: black
#.box: fill=lightblue visual=ellipse

[Final Document (.pdf/.html)] <- [<box>render_ecsa.R ]
[render_ecsa.R ] <- [Reviewed Draft (.Rmd)]
[Reviewed Draft (.Rmd)] <- [<box>merge_to_bookdown.R] 
[merge_to_bookdown.R] <- [Figure skeleton (.Rmd)]
[Reviewed Draft (.Rmd)] <- [<box>merge_to_bookdown.R] 
[merge_to_bookdown.R] <- [Text outline (google doc)]
[Figure skeleton (.Rmd)] -> [Text outline (google doc)]
[Text outline (google doc)] <- [<box>create_template.R]
[Figure skeleton (.Rmd)] <- [create_template.R]
[create_template.R] <- [Stock template (.Rmd)]

```

Incomplete rendering

I had an issue with incomplete rendering, and posted this issue, which was solved : skanaar/nomnoml#128

Would it be possible to update the package so it uses the last version of the library ?

Problems using with shiny

Hi Javier, thanks for the package, I'm loving using it.

I've run into a problem integrating it into a shiny app though and I believe it may be an issue.

When I include it in a my shiny app and then use inputs to change and re-render the diagram, the new one appears underneath the original instead of in place of it. Each time the inputs are changed a new new diagram is rendered underneath the previous ones.

Here's a small example...

library(shiny)
library(nomnoml)
library(shinydashboard)

make_diagram <- function(status = FALSE, name = "mark"){
    if (isTRUE(status)){
        nomnoml_out <- "[hello]->[world]"
    } else {
        nomnoml_out <- paste0("[hello]->[", name, "]")
    }
}

ui <- dashboardPage(
    dashboardHeader(title = "RSPM Configurator"),
    dashboardSidebar(
        textInput("textbox", label = "enter name", value = "world"),
        checkboxInput("status", label = "ignore input?", value = TRUE)
    ),
    dashboardBody(
        nomnomlOutput(outputId = "diagram")
    )
)

server <- function(input, output) {
    output$diagram <- renderNomnoml({
        nomnoml(
            make_diagram(
                status = input$status,
                name = input$textbox)
        )
    })
}

shinyApp(ui, server)

A friend found a similar issue with htmlwidgets on stack overflow, so perhaps that could be related.

I'm using R 4.0.0, with latest shiny, shinydashboard and nomnoml from CRAN.

Thanks in advance,
Mark

size of UML diagram

Thank you very much for this excellent package.
One question. How can I adjust the size of UML diagram when rendering rmarkdown. I have tried zoom and fontsize, and unable to figure out. Any suggestion, please?

Best regards,
Stewart Li

color change not working

The following is my souce code, but the .red does not change the fill color, as the documentation says it would. Any ideas?
#.red: fill=red
#spacing: 12
#padding: 4
[JESUS] --- [Andrew Scribner]
[ Andrew Scribner] o--- [Council]
[Council] --- [fdsa]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.