33 lines
806 B
Bash
33 lines
806 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
# regularity,variability,improvement,"Evolution error",steps
|
||
|
# 6.57581e-05,0.00592209,0.622392,113.016,2368
|
||
|
|
||
|
if [[ -f "$1" ]]; then
|
||
|
|
||
|
R -q --slave --vanilla <<EOF
|
||
|
print("================ Analyzing $1")
|
||
|
library(Hmisc)
|
||
|
print("spearman for improvement-potential vs. evolution-error")
|
||
|
DF=as.matrix(read.csv("$1",header=TRUE))
|
||
|
rcorr(DF[,3],DF[,4],type="spearman")
|
||
|
|
||
|
print("spearman for improvement-potential vs. steps")
|
||
|
DF=as.matrix(read.csv("$1",header=TRUE))
|
||
|
rcorr(DF[,3],DF[,5],type="spearman")
|
||
|
|
||
|
print("spearman for regularity vs. steps")
|
||
|
DF=as.matrix(read.csv("$1",header=TRUE))
|
||
|
rcorr(DF[,1],DF[,5],type="spearman")
|
||
|
|
||
|
print("spearman for variability vs. evolution-error")
|
||
|
DF=as.matrix(read.csv("$1",header=TRUE))
|
||
|
rcorr(DF[,2],DF[,4],type="spearman")
|
||
|
EOF
|
||
|
|
||
|
else
|
||
|
|
||
|
echo "Usage: $0 <Filename.csv>"
|
||
|
fi
|
||
|
|