I want to check whether 2 csv files have the same content, even though there are permutations in columns or rows between them.
I tried to check the row names, and the colnames, but yet I don't know how to manage the content difference if there are permutations between columns or rows in the 2 csv files,
A <- read.csv(args[6])
B<- read.csv(args[7])
set1=as.list(colnames(A))
set2=as.list(colnames(B))
if(length(setdiff(set1, set2))>0)cat("\n ==================>the files do not have the same colnames \n") else cat(" similar col names")
context_matrix1 <- as.matrix(A)
set1=as.list(context_matrix1[,1])
context_matrix2 <- as.matrix(B)
set2=as.list(context_matrix2[,1])
if(length(setdiff(set1, set2))>0)cat("\n ==================>the files do not have the same rownames \n") else cat(" similar rownames names")
Any help would be appreciated
Thanks