hello everybody
I have an excel file with five different sheets and in each sheet, I have different tables (by header). I imported four of them into R separately and cleaning them but now when I want to import one of the tables of the fifth sheet. when I want to have the description of the table, it just gives me 10 variables.
I import the first table successfully but...
why?
## baseline
setwd("C:/Users/....../data/request")
M<-read_excel("Baseline_BC.xlsx", "Medical info", skip = 2, n_max=2000)
variables<- rbind(M)
Baseline_BC<- variables %>% filter(Selection!="X")
# cleaning Baseline/ medical ------------------------------------------------------
setwd("C:/Users/....../raw/baseline")
bb = list.files(path = "./raw/baseline",pattern="*.xlsx")
############
###PreviousPregnancyHistory#############
dff = read_excel('C:/Users/...........History.xlsx')
###
variables<-variables %>% filter(!is.na(`Variable name`))
names<-variables$`Variable name`
df1<-dff %>% select(any_of(names))
description<-as.data.frame(names(df1))
description<-left_join(description, variables[,], by=c("names(df1)"="Variable name"))