hello everybody
I am new to r and trying to cleaning my data.
i was working on my dataset last night and now when I want to clean the rest of them by running this line of code (df<-dff %>% select(any_of(names))) I get this error.
Error: Selections can't have missing values.
Run rlang::last_error() to see where the error occurred.
i was working last night and now....
setwd("C:/Users........data/request")
## baseline
N<-read_excel("Baseline_BC.xlsx", "Nutrition", skip = 2, n_max=2000)
variables<- rbind(N)
Baseline_BC<- variables %>% filter(Selection!="X")
# cleaning Baseline/ General ------------------------------------------------------
setwd("C:/Users/......../raw/baseline")
bb = list.files(path = "./raw/baseline",pattern="*.xlsx")
dff <-read_excel('C:/Users/.......Nutrition_FoodAllergies.xlsx')
##
names<-variables$`Variable name`
df<-dff %>% select(any_of(names))
description<-as.data.frame(names(df))
description<-left_join(description, variables[,], by=c("names(df)"="Variable name"))