Closed pgbovine closed 2 years ago
e.g., filtering by conditions that result in 0 matching rows, or selecting to match 0 columns, etc.
Examples from my notes (these all seem to work for now). include library(dplyr)
for everything:
# results in an empty table
Formaldehyde %>% filter(optden > 1.5)
... then select from an empty table:
Formaldehyde %>% filter(optden > 1.5) %>% select(carb)
... then also mutate it:
Formaldehyde %>% filter(optden > 1.5) %>% select(carb) %>% mutate(carb2 = carb*2, carb3 = "hello")
(so that we can test edge cases)