Skip to content

Incompatibility with basic R eval(parse) command #24

Description

@unaivicente

Hello,
First of all, great library.

There is a basic incompatibility with the basic R parse command. I have a script with a loop that gets automatic intersections out of big datasets.

Imagine I have this model:
datamodel <- dm_from_data_frames(survey, quest_result, surv_result, question, section)
And I am trying to add references. For that, I get a vector like this:

> ref [1] "quest_result$QuestionID == question$QuestionID, quest_result$SurveyID == question$SurveyID, quest_result$SurveyID == section$SurveyID, quest_result$SurveyResultID == surv_result$SurveyResultID, quest_result$SurveyID == surv_result$SurveyID"

When I use this as an eval(parse) argument...

datamodel <- dm_add_references( datamodel, eval(parse(text = ref)) )
It gives me an error:
Error: Define references with logical expressions: dataframe1$column1 == dataframe2$column2, ...

Any ideas why?

Thank you!

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