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

Incompatibility with basic R eval(parse) command #24

Open
unaivicente opened this issue Jul 1, 2023 · 0 comments
Open

Incompatibility with basic R eval(parse) command #24

unaivicente opened this issue Jul 1, 2023 · 0 comments

Comments

@unaivicente
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant