Skip to content

Shiny UI throws "object 'GCAM_version' not found" when launched from generate_report() #36

@choiHenry

Description

@choiHenry

Hello BC3 gcamreport developers,

I was really impressed by your recent presentation — thank you for sharing your work. I’ve started using gcamreport and found it very helpful, but I encountered an issue when launching the Shiny UI.

Description

When running generate_report(..., launch_ui = TRUE), the Shiny app fails to launch and throws:

Image

This happens even though GCAM_version is passed as an argument.


Steps to Reproduce:

Run generate_report() with valid arguments as in the tutorial

## -- store the database path, name, and scenarios in a variable.
dbpath <- "examples"
dbname <- "database_basexdb_ref"
scen <- "Reference"
GCAMv <- "v7.1"

## -- choose a project name
prjname <- "example1_v7.1.dat"

## -- generate the reporting dataset until 2050 for EU-12 and EU-15 for all the 
## -- Agricultural variables, save the output in .RData, .csv and .xlsx format, 
## -- and lunch the user interface
generate_report(db_path = dbpath, db_name = dbname, scenarios = scen, 
                prj_name = prjname, final_year = 2050, GCAM_version = GCAMv,
                desired_regions = [c](https://rdrr.io/r/base/c.html)('EU-12', 'EU-15'), 
                desired_variables = [c](https://rdrr.io/r/base/c.html)('Agricultural*'), 
                save_output = TRUE, launch_ui = TRUE)

System

  • OS: Ubuntu via WSL2
  • R: 4.3.2
  • GCAM version: v7.1

Workaround

Define GCAM_version globally before calling generate_report():

GCAM_version <- "v7.1"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions