We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0fc34cf commit ebf250bCopy full SHA for ebf250b
book/content/data_manipulation/_missing_values.qmd
@@ -269,6 +269,17 @@ mydfNA$
269
pl$col("colB")$fill_null(pl$col("colA"))$name$suffix("_corrected")
270
)
271
```
272
+## tidypolars
273
+
274
+```{r}
275
+#| label: replace-missing-values-expression-tidypolars
276
+# Replace missing values with the mean of the non-null values for that column
277
+mydfNA %>%
278
+ mutate(colB_corrected = ifelse(is.na(colB), colA, colB))
279
+# Replace missing values with the values from another column
280
281
282
+```
283
284
## R base
285
0 commit comments