split sample means

This commit is contained in:
glmdev 2019-05-02 11:02:24 -05:00
parent a12a45404a
commit b4d6130575
3 changed files with 13 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -0,0 +1,11 @@
arg = commandArgs(TRUE)
samples = rep(NA, 100000)
for ( i in 1:100000 ){ samples[i] = mean(rexp(40, 0.2)) }
jpeg(paste('plots/', arg, '.jpg', sep=""))
hist(samples, main="", prob=T)
lines(density(samples), col="darkblue", lwd=3)
dev.off()

View File

@ -1,8 +1,8 @@
#!/bin/bash
#SBATCH --ntasks=5
#SBATCH --ntasks=6
cd $SLURM_SUBMIT_DIR
mkdir plots/
mpiexec -n 1 R --vanilla -f generate_plots.R
R --vanilla -f slurm_generate_plots.R --args "plot$SLURM_ARRAY_TASK_ID"