if test -s random_single.out
then
echo 
echo 
echo === THE ANALYSIS IS ALREADY COMPLETE ===
echo   VIEW PLOTS IN FILES: random_single.jpg AND random_single.pdf  
echo   VIEW OUTCOME IN FILE: random_single.out 
echo 
echo 
else
sed 1d DATA1.nodes | awk '{print $1}' | awk 'BEGIN{srand();}{print rand()"\t"$0}' | sort -k1 -n | cut -f2- | sed 's/ //g' | sed 's/^/.\/get_node_perturbation_1 /' >get_node_perturbation_all
chmod a+x get_node_perturbation_all
echo 
echo 
echo ==== SIMULATING RANDOM SINGLE RUNS =====
echo 
./get_node_perturbation_all
echo ====         COMPLETED!            =====
echo 
cat line2 node*out >random_single.out
`cat Rpath` --no-restore --no-save --no-readline --slave < run_random_single.R >>R.out
echo   VIEW PLOTS IN FILES: random_single.jpg AND random_single.pdf  
echo 
echo
fi 
echo  ========================================
echo 
echo 
