Skip to content

Commit da16c4f

Browse files
tdhockToby Dylan Hocking
andauthored
variante code organisation (#551)
Co-authored-by: Toby Dylan Hocking <[email protected]>
1 parent d46bd76 commit da16c4f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

03_Fiches_thematiques/Fiche_datatable.qmd

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,20 @@ resultat <-
143143
]
144144
```
145145

146+
La variante ci-dessous, avec les arguments dans les lignes après l'ouverture du crochet (pas sur la même ligne), permet de facilement rajouter des commentaires (`#`) pour sauter une étape :
147+
148+
```{r, eval = FALSE}
149+
resultat <- dt[
150+
# i = ...,
151+
# j = ...,
152+
# by = ...
153+
][
154+
i = ...,
155+
j = ...,
156+
by = ...
157+
]
158+
```
159+
146160
La seconde organisation sépare les opérations en utilisant une table intermédiaire nommée `resultat` :
147161

148162
```{r, eval = FALSE}

0 commit comments

Comments
 (0)