Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added vignettes/.RDataTmp
Binary file not shown.
6 changes: 3 additions & 3 deletions vignettes/datatable-intro.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ You can also convert existing objects to a `data.table` using `setDT()` (for `da
getOption("datatable.print.nrows")
```

* `data.table` doesn't set or use *row names*, ever. We will see why in the *Keys and fast binary search based subset* vignette.
* `data.table` doesn't set or use *row names*, ever. We will see why in the [`vignette("datatable-keys-fast-subset", package="data.table")`](datatable-keys-fast-subset.html) vignette.

### b) General form - in what way is a `data.table` *enhanced*? {#enhanced-1b}

Expand Down Expand Up @@ -473,7 +473,7 @@ ans

**Keys:** Actually `keyby` does a little more than *just ordering*. It also *sets a key* after ordering by setting an `attribute` called `sorted`.

We'll learn more about `keys` in the *Keys and fast binary search based subset* vignette; for now, all you have to know is that you can use `keyby` to automatically order the result by the columns specified in `by`.
We'll learn more about `keys` in the [`vignette("datatable-keys-fast-subset", package="data.table")`](datatable-keys-fast-subset.html) vignette; for now, all you have to know is that you can use `keyby` to automatically order the result by the columns specified in `by`.

### c) Chaining

Expand Down Expand Up @@ -682,7 +682,7 @@ We have seen so far that,

* We can also sort a `data.table` using `order()`, which internally uses data.table's fast order for better performance.

We can do much more in `i` by keying a `data.table`, which allows for blazing fast subsets and joins. We will see this in the vignettes *Keys and fast binary search based subset* and *`data.table joins`*.
We can do much more in `i` by keying a `data.table`, which allows for blazing fast subsets and joins. We will see this in the vignettes [`vignette("datatable-keys-fast-subset", package="data.table")`](datatable-keys-fast-subset.html) and [`vignette("datatable-joins", package="data.table")`](datatable-joins.html).

#### Using `j`:

Expand Down
3 changes: 2 additions & 1 deletion vignettes/datatable-joins.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ output:
litedown::html_format
vignette: >
%\VignetteIndexEntry{Joins in data.table}
%\VignetteEngine{litedown::vignette}
\usepackage[utf8]{inputenc}
%\VignetteEngine{litedown::vignette}
editor_options:
chunk_output_type: console
---
Expand All @@ -27,6 +27,7 @@ It assumes familiarity with the `data.table` syntax. If that is not the case, pl
- [`vignette("datatable-intro", package="data.table")`](datatable-intro.html)
- [`vignette("datatable-reference-semantics", package="data.table")`](datatable-reference-semantics.html)
- [`vignette("datatable-keys-fast-subset", package="data.table")`](datatable-keys-fast-subset.html)
- [`vignette("datatable-secondary-indices-and-auto-indexing", package="data.table")`](datatable-secondary-indices-and-auto-indexing.html)

***

Expand Down
2 changes: 1 addition & 1 deletion vignettes/datatable-reference-semantics.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ head(flights)
```{r}
flights[, names(.SD) := lapply(.SD, as.factor), .SDcols = is.character]
```
Let's clean up again and convert our newly-made factor columns back into character columns. This time we will make use of `.SDcols` accepting a function to decide which columns to include. In this case, `is.factor()` will return the columns which are factors. For more on the **S**ubset of the **D**ata, there is also an [SD Usage vignette](https://cran.r-project.org/package=data.table/vignettes/datatable-sd-usage.html).
Let's clean up again and convert our newly-made factor columns back into character columns. This time we will make use of `.SDcols` accepting a function to decide which columns to include. In this case, `is.factor()` will return the columns which are factors. For more on the **S**ubset of the **D**ata, there is also an [SD Usage vignette ('vignette("datatable-sd-usage", package="data.table")')](datatable-sd-usage.html).

Sometimes, it is also nice to keep track of columns that we transform. That way, even after we convert our columns we would be able to call the specific columns we were updating.
```{r}
Expand Down
1 change: 1 addition & 0 deletions vignettes/es/datatable-joins.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Se presupone familiaridad con la sintaxis de `data.table`. De no ser así, lea l
- [`viñeta("datatable-intro", paquete="data.table")`](datatable-intro.html)
- [`viñeta("datatable-reference-semantics", paquete="data.table")`](datatable-reference-semantics.html)
- [`viñeta("datatable-keys-fast-subset", paquete="data.table")`](datatable-keys-fast-subset.html)
- [`viñeta("datatable-secondary-indices-and-auto-indexing", paquete="data.table")`](datatable-secondary-indices-and-auto-indexing.html)

***

Expand Down
2 changes: 1 addition & 1 deletion vignettes/es/datatable-reference-semantics.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ head(flights)
flights[, names(.SD) := lapply(.SD, as.factor), .SDcols = is.character]
```

Limpiemos de nuevo y convirtamos nuestras columnas de factores recién creadas en columnas de caracteres. Esta vez, usaremos `.SDcols`, que acepta una función para decidir qué columnas incluir. En este caso, `is.factor()` devolverá las columnas que son factores. Para más información sobre el **S**subconjunto de **D**atos, también hay una viñeta de uso de SD (https://cran.r-project.org/package=data.table/vignettes/datatable-sd-usage.html).
Limpiemos de nuevo y convirtamos nuestras columnas de factores recién creadas en columnas de caracteres. Esta vez, usaremos `.SDcols`, que acepta una función para decidir qué columnas incluir. En este caso, `is.factor()` devolverá las columnas que son factores. Para más información sobre el **S**ubconjunto de **D**atos, también hay una [viñeta de uso de SD ('vignette("datatable-sd-usage", package="data.table")')](datatable-sd-usage.html).

A veces, también es útil llevar un registro de las columnas que transformamos. De esta manera, incluso después de convertirlas, podremos llamar a las columnas específicas que actualizamos.

Expand Down
1 change: 1 addition & 0 deletions vignettes/fr/datatable-joins.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Cela suppose que vous êtes déjà familiarisé avec la syntaxe `data.table` . S
- [`vignette("datatable-intro", package="data.table")`](datatable-intro.html)
- [`vignette("datatable-reference-semantics", package="data.table")`](datatable-reference-semantics.html)
- [`vignette("datatable-keys-fast-subset", package="data.table")`](datatable-keys-fast-subset.html)
- [`vignette("datatable-secondary-indices-and-auto-indexing", package="data.table")`](datatable-secondary-indices-and-auto-indexing.html)

***

Expand Down
2 changes: 1 addition & 1 deletion vignettes/fr/datatable-reference-semantics.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ head(flights)
flights[, names(.SD) := lapply(.SD, as.factor), .SDcols = is.character]
```

Nettoyons à nouveau et convertissons nos colonnes de facteurs nouvellement créées en colonnes de caractères. Cette fois, nous allons utiliser `.SDcols` qui accepte une fonction pour décider quelles colonnes inclure. Dans ce cas, `is.factor()` retournera les colonnes qui sont des facteurs. Pour en savoir plus sur le **S**ous-ensemble des **D**onnées (**S**ubset of the **D**ata), il y a aussi une [vignette sur l’utilisation de SD](https://cran.r-project.org/package=data.table/vignettes/datatable-sd-usage.html).
Nettoyons à nouveau et convertissons nos colonnes de facteurs nouvellement créées en colonnes de caractères. Cette fois, nous allons utiliser `.SDcols` qui accepte une fonction pour décider quelles colonnes inclure. Dans ce cas, `is.factor()` retournera les colonnes qui sont des facteurs. Pour en savoir plus sur le **S**ous-ensemble des **D**onnées (**S**ubset of the **D**ata), il y a aussi une [vignette sur l’utilisation de SD ('vignette("datatable-sd-usage", package="data.table")')](datatable-sd-usage.html)

Parfois, il est également utile de garder une trace des colonnes que nous transformons. Ainsi, même après avoir converti nos colonnes, nous pourrons toujours appeler les colonnes spécifiques que nous avons mises à jour.

Expand Down