R语言模型开发中的列类型转换为向量
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))
print(nn)
head(data[, nn])
方法二参数传入 mm <- c(“Sepal.Length”, “Sepal.Width”)
print(mm)
str(mm)
head(data[, mm])
页:
[1]