Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error message for elements not available in the formula #81

Open
auzaheta opened this issue Sep 28, 2022 · 0 comments
Open

Improve error message for elements not available in the formula #81

auzaheta opened this issue Sep 28, 2022 · 0 comments
Assignees
Labels
Difficulty: Moderate Expected workload is several weeks. Status: Revision Needed Issue needs more thinking or feedback before it can be addressed. Type: Enhancement Issue is about improving an existing feature.

Comments

@auzaheta
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

When model specification includes actors' attributes that don't exist in the nodes' data frame, the error is not informative.

library(goldfish)
data("Social_Evolution")
callNetwork <- defineNetwork(nodes = actors, directed = TRUE)
callNetwork <- linkEvents(x = callNetwork, changeEvent = calls, nodes = actors)
callsDependent <- defineDependentEvents(events = calls, nodes = actors, defaultNetwork = callNetwork)

mod <- estimate(callsDependent ~ inertia + alter(actors$uno))
> Error in getElementFromDataObjectTable(objectNameTable, envir = envir)[[1]] : 
> subscript out of bounds

Describe the solution you'd like
An informative error indicating that the formula uses objects not available.

@auzaheta auzaheta self-assigned this Sep 28, 2022
@auzaheta auzaheta added Type: Enhancement Issue is about improving an existing feature. Difficulty: Moderate Expected workload is several weeks. Status: Revision Needed Issue needs more thinking or feedback before it can be addressed. labels Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty: Moderate Expected workload is several weeks. Status: Revision Needed Issue needs more thinking or feedback before it can be addressed. Type: Enhancement Issue is about improving an existing feature.
Projects
None yet
Development

No branches or pull requests

1 participant