Skip to content

Commit e17ab16

Browse files
Update code
1 parent aa0c834 commit e17ab16

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

07-model-slr.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,9 +502,9 @@ crops_country <- crops_country %>%
502502
ungroup() %>%
503503
pivot_wider(
504504
names_from = crop,
505-
values_from = c(total, prop)
505+
values_from = c(total, prop),
506+
values_fill = 0
506507
) %>%
507-
na_if(0) %>%
508508
mutate(
509509
n_missing = rowSums(is.na(.)) / 2
510510
) %>%

0 commit comments

Comments
 (0)