Rscript /jhbigdata/appform/etc/R-code/Method-shujutongji/All-combination-Below.R /mnt/hdfs/user/jhadmin/duoyuanxianxing.csv R1 Fertility,Agriculture,Examination,Education,Catholic,Infant.Mortality
原始数据

data <- iris

方法一参数传入

nn <- “Sepal.Length,Sepal.Width”
nn <- strsplit(nn,",")
print(nn)
str(nn)
length(nn)
nn <- as.vector(unlist(nn[1]))
print(nn)
head(data[, nn])
R语言模型开发中的列类型转换为向量_R语言

方法二参数传入

mm <- c(“Sepal.Length”, “Sepal.Width”)
print(mm)
str(mm)
head(data[, mm])
R语言模型开发中的列类型转换为向量_编程开发_02