When I make the command sbatch job.sh and everything runs smoothly, a file test.Rout is generated at the location of my job.sh, I would like to know how to change the location of this .Rout file.
job.sh
#!/bin/bash
#SBATCH --job-name="test
#SBATCH --nodes=1 # number of nodes
#SBATCH --ntasks-per-node=10 # number of cores
#SBATCH --time=01:00:00 # walltime
#SBATCH --output=error/job.out
#SBATCH --error=error/error.err
module load R
R CMD BATCH test.R
test.R
print(2+2)
test.Rout
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
[Previously saved workspace restored]
> print(2+2)
[1] 4
>
> proc.time()
user system elapsed
0.107 0.039 0.154