"Unknown or uninitialised column" error

hi everybody,
I have 2 problems.
first, the description file that creates does not have any observation.
second, when I try to use the table function I get this error
Unknown or uninitialised column: MattressType.


E<-read_excel("Baseline_BC.xlsx", "Exposure", skip = 2, n_max=2000)
variables<- rbind(E)
Baseline_BC<- variables %>% filter(Selection!="X")
# cleaning Baseline/ exposure ------------------------------------------------------
bb = list.files(path = "./raw/baseline",pattern="*.xlsx")

dfg <-read_excel('C:/...../raw/baseline/Mother_Exposure_HomeAlergies.xlsx')
names<-Baseline_BC$"Variable name"
df<-dfg %>% select(any_of(names))
description<-left_join(description, Baseline_BC[,], by=c("names(df)"="Variable name"))

Anyone can help me?

A reprex would be great so we can help you. See here welcome post here: Welcome to the RStudio Community!


Copy all of your code, including the libraries, and run command reprex() in the console. Then copy paste the results here. Feel free to censure your directory names with ... as you did before.