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

QC: Check length of lTags in all *_Assess() functions #321

Closed
mattroumaya opened this issue Mar 25, 2022 · 1 comment · Fixed by #383
Closed

QC: Check length of lTags in all *_Assess() functions #321

mattroumaya opened this issue Mar 25, 2022 · 1 comment · Fixed by #383
Assignees
Milestone

Comments

@mattroumaya
Copy link
Contributor

QC Details

All named objects in lTags must have length == 1 because it is added as a column to dfSummary

Possible solutions:

  • Catch and throw an error
  • Create a vector of length 1 using paste(vector, collapse = ", ")
  • Probably a combination of both will be needed, to ensure data.frames() or other objects aren't attempted to be passed through in lTags.

Additional Comments

Below error should be caught or reconciled:

IE_Assess(dfInput, lTags = list("siteID" = 1:10))

# this runs but fails with message:
Error in `bind_cols()`:
! Can't recycle `..1` (size 175) to match `siteID` (size 10).
@mattroumaya mattroumaya added this to the v0.4.0 milestone Mar 25, 2022
@jwildfire
Copy link
Contributor

Possible solutions:

  • Catch and throw an error
  • Create a vector of length 1 using paste(vector, collapse = ", ")
  • Probably a combination of both will be needed, to ensure data.frames() or other objects aren't attempted to be passed through in lTags.

Good catch. Agree we should coerce to character and collapse.

mattroumaya added a commit that referenced this issue Apr 26, 2022
Fix #321 - check length of lTags and squash if > 1
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

Successfully merging a pull request may close this issue.

2 participants