masterarbeit/dokumentation/evolution1d/R_mean_med_sigma.sh
2017-10-27 14:31:55 +02:00

27 lines
448 B
Bash
Executable File

#!/bin/bash
# regularity,variability,improvement,"Evolution error",steps
# 6.57581e-05,0.00592209,0.622392,113.016,2368
if [[ -f "$2" ]]; then
R -q --slave --vanilla <<EOF
print("================ Analyzing $2")
#library(Hmisc)
DF=as.matrix(read.csv("$2",header=TRUE))
print("Mean:")
mean(DF[,$1])
print("Median:")
median(DF[,$1])
print("Sigma:")
sd(DF[,$1])
print("Range:")
range(DF[,$1])
EOF
else
echo "Usage: $0 <column> <Filename.csv>"
fi