简体   繁体   中英

Why the first column of a Microsoft excel 97-2003 worksheet reads the variable names as an observation in R?

The worksheet is a 97-2003 MS excel file.While reading it in R it reads the first column as an observation and not as variable name.What could be missing?

library(readxl)
Factor_Analysis <- read_excel("Factor Analysis.xls",col_names = TRUE)

Adding skip=1 worked as excel had 1 empty row at top.

Factor_Analysis <- read_excel("Factor Analysis.xls",col_names = TRUE,skip=1)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM