You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue is that when the column of cog is NA this line is empty:
tmp <- attr(x[[i]], "cogAttrs")
when it is empty the row count is mismatched on the next line:
data.frame(name = nms[i], tmp, stringsAsFactors = FALSE)
Two ideas present themselves:
Catch and give a stop with a decent error message. Difficultly: easy. if(all(is.na(...))) stop("At least one cognostic of _name_ must not be NA")
Make it work. Technically not broken? Maybe it is. Difficulty: little harder. Involves checking tmp and also making sure everything down streams of it still works with all NA. Maybe not worth it. An NA column has no decision-able information it is just taking up space.
I think it is worth fixing because you really need to back up and think "what did I do last?" to figure this one out. In my case I added a bunch of cognostics and one was always NA. #1 sounds safest to me. Just catch it and give it a decent message. Want a pull request?
The text was updated successfully, but these errors were encountered:
If you are like me you are like what?
The bug bites here:
https://github.com/tesseradata/trelliscope/blob/1a651ad231546b592236cb7251fa31d1f7f1adc6/R/cognostics.R#L413
The issue is that when the column of cog is NA this line is empty:
tmp <- attr(x[[i]], "cogAttrs")
when it is empty the row count is mismatched on the next line:
data.frame(name = nms[i], tmp, stringsAsFactors = FALSE)
Two ideas present themselves:
if(all(is.na(...))) stop("At least one cognostic of _name_ must not be NA")
I think it is worth fixing because you really need to back up and think "what did I do last?" to figure this one out. In my case I added a bunch of cognostics and one was always NA.
#1 sounds safest to me. Just catch it and give it a decent message. Want a pull request?
The text was updated successfully, but these errors were encountered: