Skip to content

Commit

Permalink
Update R/input-time-series.R
Browse files Browse the repository at this point in the history
Co-authored-by: Rob <39248272+r-ash@users.noreply.github.com>
  • Loading branch information
rtesra and r-ash authored Oct 30, 2024
1 parent 7eaae28 commit 38b1a7f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions R/input-time-series.R
Original file line number Diff line number Diff line change
Expand Up @@ -581,15 +581,18 @@ prepare_art_spectrum_comparison <- function(art, shape, pjnz) {

## Check if shape is object or file path
if(!inherits(shape, "sf")) {
shape <- read_area_merged(shape) }
shape <- read_area_merged(shape)
}

## Check if art is object or file path
if(!inherits(art, c("spec_tbl_df","tbl_df","tbl","data.frame" ))) {
art <- read_art_number(art, all_columns = TRUE)}
art <- read_art_number(art, all_columns = TRUE)
}

## PJNZ either object or file path
if (!inherits(pjnz, "spec_program_data")) {
pjnz <- extract_pjnz_program_data(pjnz) }
pjnz <- extract_pjnz_program_data(pjnz)
}

## Aggregate ART data
art_agreggated <- art |>
Expand Down

0 comments on commit 38b1a7f

Please sign in to comment.