Skip to content

Commit

Permalink
Use drop_na() instead of remove_missing()
Browse files Browse the repository at this point in the history
  • Loading branch information
carpentries-bot committed Dec 24, 2024
1 parent 4b0ed0e commit 50e63cb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion episodes/basic-targets.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ penguins_data <- penguins_data_raw |>
bill_depth_mm = `Culmen Depth (mm)`
) |>
# Delete rows with missing data
remove_missing(na.rm = TRUE)
drop_na()
penguins_data
```
Expand Down
2 changes: 1 addition & 1 deletion episodes/files/plans/plan_1.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ clean_penguin_data <- function(penguins_data_raw) {
bill_length_mm = `Culmen Length (mm)`,
bill_depth_mm = `Culmen Depth (mm)`
) |>
remove_missing(na.rm = TRUE)
drop_na()
}

list(
Expand Down
2 changes: 1 addition & 1 deletion episodes/files/tar_functions/clean_penguin_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ clean_penguin_data <- function(penguins_data_raw) {
bill_length_mm = `Culmen Length (mm)`,
bill_depth_mm = `Culmen Depth (mm)`
) |>
remove_missing(na.rm = TRUE) |>
drop_na() |>
# Split "species" apart on spaces, and only keep the first word
separate(species, into = "species", extra = "drop")
}

0 comments on commit 50e63cb

Please sign in to comment.