I have the following R script:
target <- c("Autocorrelation","InformationContent_zero","InformationContent_one","InformationContent_two",
"InformationContent_four","PartialIC_zero","PartialIC_one","PartialIC_two","PartialIC_four",
"DBI_zero","DBI_one","DBI_two","DBI_four")
for (tar in target){
AC_data <- subset(data, select=c(tar))
AC <- aggregate(AC_data , list(class=data$TARGET_CLASS), mean)
ordered_AC <- AC[order(-AC[tar]),]
write.csv(ordered_AC,file="/home/nasser/Desktop/Experiments/evosuite-report/finalData.csv",append=TRUE)
}
When I run the script with the data that I process I get the following results:
class Autocorrelation
16 SomeExternalClass11 0.26582445
3 MoreMethodsModified 0.21295785
10 MultiPlateauxModified 0.19942221
1 DoublePeaks 0.19534564
class InformationContent_zero
2 MoreMethods 0.17936452
7 MultiPeaks 0.13527150
12 NeedleInHaystackNoParm 0.11714634
6 MultiMethodsModified 0.07180512
class InformationContent_one
2 MoreMethods 0.17936452
7 MultiPeaks 0.13527150
12 NeedleInHaystackNoParm 0.11714634
6 MultiMethodsModified 0.07180512
The problem is that the only data that is written to the CSV file is the last group which is class InformationContent_one
That means the first two groups are overwritten. Do you know how to fix this and let all the data are written to the CSV file?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…