r语言中的set names gbk是什么意思

Python015

r语言中的set names gbk是什么意思,第1张

setNames(stats)setNames()所属R语言包:statsSet the Names in an Object 设置对象的名称 译者:生物统计家园网 机器人LoveR描述----------Description----------This is a convenience function that sets the names on an object and returns the object. It is most useful at the end of a function definition where one is creating the object to be returned and would prefer not to store it under a name just so the names can be assigned.这是一个方便的功能设置对象的名称,并返回对象。这是最有用的,其中一个是创建要返回的对象,宁愿不存储它只是一个名字下,这样的名字可以被分配一个函数定义结束。

udf_async_rbind <- function(path= "D:/R/oper_key_index/data/d_data/",

name= "移网线上单" ,

Date_temp = format(Date_stemp,"%Y%m%d"), # 直接引用变量不执行,需加函数转为常量

Date_last_month_day = ymd("2021-08-31") , # 函数内变量名不要与外部变量名重复

Date_last_month_day1= ymd("2021-07-31") ,

cols=190 ){

x <- udf_DT(paste0(path,name,Date_temp,".xlsx") , 1 ,0)

y <- udf_DT(paste0(path,name,format(Date_last_month_day,"%Y%m%d"),".xlsx"),1,0)

z <- udf_DT(paste0(path,name,format(Date_last_month_day1,"%Y%m%d"),".xlsx"),1,0)

if(ncol(x)>70){

x <- x[,1:cols]

y <- y[,1:cols]

z <- z[,1:cols]}else{print("全列导入")}

setnames(y,names(x))

table <- rbind(x, y)

return(table)

}

mob_dev_2ilist <- udf_async_rbind( name = "移网线上单" )