## R语言脚本连接阿里云MaxCompute载入特征矩阵数据，返回一个data frame，函数是指定的名称load_data()
library(RODPS)

rodps.set("odps.sql.type.system.odps2","TRUE")
rodps.set("odps.sql.decimal.odps2","TRUE")
rodps.set("odps.sql.hive.compatible","FALSE")
rodps.set("odps.sql.allow.fullscan","true")

load_data<- function(){
  df<-   rodps.sql("select * from airpassengers;")
  df$yy<- as.integer(substr(df$month,1,4))
  df$mm<- as.integer(substr(df$month,6,7))
  df$index<-as.integer(row.names(df))
  return(df)
}