我正在尝试使用 sjplot 和 tab_df 函数构建一个表,但无法获取表中的标签名称:
library(sjPlot)
library(stargazer)
Region<-c("Berlin", "Hamburg", "Berchtesgarden")
Sensor<-c("Riegl ", "Riegl ", "Riegl ")
Platform<-c("Aircraft", "UAV", "Helicoper")
Acquisition_Year <-c("2002", "2002", "2002")
Month<-c("August", "September", "July")
Flight_Height<-c("400-600m AGL","400-600m AGL","400-600m AGL")
LidarAcq<-as.data.frame(cbind(Region, Sensor, Platform, Acquisition_Year, Month, Flight_Height))
LidarAcq
attr(LidarAcq$Region, "label") <- "Region"
attr(LidarAcq$Sensor, "label") <- "Sensor"
attr(LidarAcq$Platform, "label") <- "Platform"
attr(LidarAcq$Acquisition_Year, "label") <- "Acquisition Year"
attr(LidarAcq$Month, "label") <- "Month"
attr(LidarAcq$Flight_Height, "label") <- "Flight Height"
tab_df(LidarAcq, title = "Lidar Acquisition Parameters" , file= "~/LidarAcq.doc")
据我了解, sjplot 应该自动识别标签......
那么我做错了什么?