Fix RScript input

This commit is contained in:
2024-08-04 23:01:10 -04:00
parent 0715c2b150
commit 4059cc965f
7 changed files with 21 additions and 23 deletions

View File

@@ -8,14 +8,14 @@ library(dplyr)
args <- commandArgs(TRUE)
# Set output dir
if (length(args) > 1) {
if (length(args) >= 1) {
outDir <- args[1]
} else {
outDir <- "./" # for legacy workflow
}
# Set sd value
if (length(args) > 2) {
if (length(args) >= 2) {
sd <- args[2]
} else {
sd <- 2 # default value
@@ -23,7 +23,7 @@ if (length(args) > 2) {
print(paste("SD=",sd))
# Set studyInfo file
if (length(args) > 3) {
if (length(args) >= 3) {
studyInfo <- args[3]
} else {
studyInfo <- "../Code/StudyInfo.csv" # for legacy workflow