Skip to content

Error in arrange_variables #2

@hyunjimoon

Description

@hyunjimoon

I ran a vensim xmile file and encountered the following error:

Error in sum(undefined_vars) : invalid 'type' (list) of argument

the reason seems to be rh_vars is empty which I fixed by adding the following in this line. This makes sure sum(undefined_vars) happens only when undefined_vars is nonempty.

    if(length(undefined_vars) != 0){
      n_und_var <- sum(undefined_vars)
    }
    else{
      n_und_var <- 0
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions