Skip to content

Error on build function #34

@roquebetioljr

Description

@roquebetioljr

I'm trying make forsysr+patchmax to run on a Docker Image, but I'm getting an error when executing forsys::run function.

The error message is:

ERROR ...: Error in `dplyr::select()`:
! `select()` doesn't handle lists.

After some debugging and investigation, I noticed that inside build function, when stand data is appended, the function vertex_attr might be returning a list, which is not a valid input for dplyr::select. Therefore, causing this error.

aux_data <- vertex_attr(private$..net) %>%

I'm not much experienced with R, but I think the vertex_attr return must be transformed into a data frame, like in constructor

a <- vertex_attr(private$..net) %>% data.frame()
.

      # append  stand data
      aux_data <- vertex_attr(private$..net) %>% data.frame() %>%
        dplyr::select(node = name, 
               private$..param_objective_field, 
               original_area = ..area)

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions