From 5e080711ba82447a09de9fc3e79489a5aa2274a4 Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Fri, 4 Nov 2022 11:43:44 -0500 Subject: [PATCH] Fix drop example --- base-R.qmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base-R.qmd b/base-R.qmd index ec97271..f0d0cd4 100644 --- a/base-R.qmd +++ b/base-R.qmd @@ -138,7 +138,7 @@ df2[, "x"] One way to avoid this ambiguity with `data.frame`s is to explicitly specify `drop = FALSE`: ```{r} -df1["x", , drop = FALSE] +df1[, "x", drop = FALSE] ``` ### dplyr equivalents