Yes, data.table works well with base **R** and tidyverse but the syntax and, I think, the design philosophies are quite different.

From A data.table and dplyr tour

*Syntax:*

- The general data.table syntax is as follows:
`DT[i, j, by, ...]`

which means: “Take DT, subset rows using `i`

, then calculate `j`

, grouped by `by`

” with possible extra options `...`

. It allows to combine several operations in a very concise and consistent expression.
- The syntax of dplyr is based on key verbs corresponding to the most common operations:
`filter()`

, `arrange()`

, `select()`

, `mutate()`

, `summarise()`

, … These functions can be combine with `group_by()`

to aggregate data ‘by group’ and with a bunch of helper functions. It is a ‘do one thing at a time’ approach, chaining together functions dedicated to a specific task.

So the basic answer for the brackets is that this in how **R** identifies what dataset and what subsets of data are to be used. You can think of it as somewhat the equivalent of

```
airquality %>%
```

in the tidyverse.

And so

```
airquality %>%
filter(Solar.R > 150, Wind > 10)
```

is the equivalent of

```
dat1[Solar.R > 150 & Wind > 10]
```

The really nice thing is that we can use most or all base and tidyverse commands within data.table so we get the best of both worlds.

For example try this:

```
library(data.table)
library(tidyverse)
dat1 <- as.data.table(airquality) ## Convert data.frame to data.table
dat1[ , ggplot(, aes(Ozone, Wind)) + geom_point()]
```