diff --git a/.github/workflows/draft-pdf.yml b/.github/workflows/draft-pdf.yml index 36b3423..b02906a 100644 --- a/.github/workflows/draft-pdf.yml +++ b/.github/workflows/draft-pdf.yml @@ -1,6 +1,6 @@ name: "paper" -on: +on: push: branches: - main @@ -23,10 +23,10 @@ jobs: # This should be the path to the paper within your repo. paper-path: paper/paper.md - name: Upload - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v4 with: name: paper # This is the output path where Pandoc will write the compiled # PDF. Note, this should be the same directory as the input # paper.md - path: paper/paper.pdf \ No newline at end of file + path: paper/paper.pdf diff --git a/R/gcam_agprodchange.R b/R/gcam_agprodchange.R index 8298600..4262164 100644 --- a/R/gcam_agprodchange.R +++ b/R/gcam_agprodchange.R @@ -362,7 +362,7 @@ get_weighted_yield_impact <- function(data = NULL, # calculate yield shocks for each GCAM commodity based on the weighted crop areas within the Region-basin intersection yield_impact_clean <- yield_impact_clean %>% - dplyr::left_join(gcam_commod, by = 'crop') %>% + dplyr::left_join(gcam_commod, by = 'crop', relationship = 'many-to-many') %>% dplyr::left_join(cropland_glu_region %>% tidyr::separate(crop, into = c('irrtype', 'crop_id'), sep = '_') %>% dplyr::left_join(crop_mirca, by = c('crop_id')) %>% diff --git a/R/pkg_utils.R b/R/pkg_utils.R index e04dede..3e3e477 100644 --- a/R/pkg_utils.R +++ b/R/pkg_utils.R @@ -245,7 +245,8 @@ agprodchange_ref <- function(gcam_version = 'gcam7', gcamdata_dir = NULL) { - year <- AgProdChange <- AgProdChange_ni <- NULL + year <- AgProdChange <- AgProdChange_ni <- region <- AgSupplySector <- + AgSupplySubsector <- AgProductionTechnology <- high <- low <- ssp4 <- ref <- NULL if(!is.null(gcamdata_dir)){