moodymudskipper / flow

View and Browse Code Using Flow Diagrams
https://moodymudskipper.github.io/flow/
Other
395 stars 26 forks source link

Fix condition #78

Closed llrs closed 2 years ago

llrs commented 2 years ago

Many thanks for this package! I'm sure it will help a lot.

Trying to use it I run into an error:

Error in is.call(x) && as.character(x[[1]]) %in% constructs : 
  'length(x) = 3 > 1' in coercion to 'logical(1)'

This is on the %call_in% function. This PR fixes this by assuming that if any character is in constructs is what it was meant.

moodymudskipper commented 2 years ago

Thanks! I think we should use deparse1 instead of as.character here, and then no need for any. It will be a bit more robust

llrs commented 2 years ago

I use deparse1 (and backported it to close #68) but the local tests are failing

moodymudskipper commented 2 years ago

Thanks a lot I will take a look!

moodymudskipper commented 2 years ago

Thanks!