从CSV文件逐行读取

时间:2019-04-25 03:10:55

标签: r

我将读取file.csv,该文件存储了如下结构的网络信息:

react-native link react-native-image-picker 
Scanning folders for symlinks in /opt/app/dev/prescribedjobs/node_modules (22ms)
rnpm-install ERR! ERRPACKAGEJSON No package found. Are you sure this is a React Native project?

(assets || []).map is not a function

我想获得一个类似于以下代码的列表:

FileName
F://RR//1.csv
F://RR//2.csv
F://RR//3.csv

计算出每个文件中存储的矩阵后,结果应输出到out.csv

因此,我需要帮助来完成该任务,非常感谢。

my_list<- c("F://RR//1.csv","F://RR//2.csv","F://RR//3.csv")

预期输出:out.csv

library(igraph)
library(DirectedClustering)
my_list<- c("F://RR//1.csv","F://RR//2.csv","F://RR//3.csv")
length(my_list)
for(i in 1:length(my_list))
{
    my_data <- read.csv(my_list,head=TRUE, row.names =1 )
    my_matrix <-as.matrix(my_data)
    CGClust<-ClustBCG(my_matrix, "directed")
    print(CGClust[["GlobaltotalCC"]])
}

0 个答案:

没有答案