I have the following data
Year <- c("2021","2021","2021","2021","2021","2021")
Month <- c("8","8","8","8","8","8")
Day <- c("10","15","18","20","22","25")
Hour <- c("171110","171138","174247","183542","190156","190236")
Id_Type <- c("2","2","1","","1","")
Code_Intersecction <- c("340","","","210","750","980")
Data = data.frame(Year,Month,Day,Hour,Id_Type,Code_Intersecction)
I need to count the amount of "" that exists in the base, for that I use the following if it is greater than 5% it takes the value of 1 otherwise 0
Data_Null = as.data.frame(purrr::map_dbl(Data, .f = function(x){ifelse(round(sum(x == '')/nrow(Data)*100L,3) >= 5, 1, 0)}))
colnames(Data_Null) = "Null"
the problem comes when I see the data frame it only takes me one column and not 2; names and value 0/1
How can I make it appear as follows