Why are zero variables shown after using drop_na()?

35 Views Asked by At

After drop_na it shows 0 obs. of 68 variables:

enter image description here

enter image description here

enter image description here

After drop_na I don't see any results in the Table except dates. This was not the case when I tried it before, I could see the values ​​in the table.


> library(tidyverse)
> WDI_GDP <- read_csv("C:/Users/ASYA/Desktop/P_Data_Extract_From_World_Development_Indicators/b0351889-13b3-4cbe-a5c0-a2dd9d633eab_Data.csv")

> library(tidyverse)

> WDI_GDP <- read_csv("C:/Users/ASYA/Desktop/P_Data_Extract_From_World_Development_Indicators/b0351889-13b3-4cbe-a5c0-a2dd9d633eab_Data.csv")

> WDI_GDP <- WDI_GDP %>% 
+   mutate(across(contains("[YR"), ~na_if(.x,"..")) %>% 
+   mutate(across(contains("[YR"), as.numeric)))
> WDI_GDP <- drop_na(WDI_GDP)
>


enter image description here

0

There are 0 best solutions below