Skip to content

Commit

Permalink
Changed empty.R file
Browse files Browse the repository at this point in the history
  • Loading branch information
JoryGriffith committed Dec 17, 2024
1 parent c9ffe39 commit 9bece60
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions scripts/helloWorld/empty.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,30 @@

## Install required packages
packages <- c("rjson")
new.packages <- packages[!(packages %in% installed.packages()[,"Package"])]
if(length(new.packages)) install.packages(new.packages)

## Receiving arguments from input.json.
## outputFolder is already defined by server
library("rjson")
input <- fromJSON(file=file.path(outputFolder, "input.json"))
input <- biab_inputs()

## Parameter validation
<YOUR VALIDATION HERE>

## Script body
<YOUR CODE HERE>

## Error
if (<SOME CONDITION>){
biab_error_stop("ERROR MESSAGE")
}

## Warning
if (<SOME CONDITION>){
biab_warning("WARNING MESSAGE")
}

## Outputing result to JSON
output <- list(
biab_output(
# Add your outputs here "key" = "value"
# The output keys correspond to those described in the yml file.
<YOUR OUTPUTS HERE>
Expand Down

0 comments on commit 9bece60

Please sign in to comment.