ropensci / visdat

Preliminary Exploratory Visualisation of Data

Home Page:https://docs.ropensci.org/visdat/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

More informative error message when user supplies non data.frame object to vis_dat

thisisnic opened this issue · comments

I was trying out visdat::vis_dat for the first time (great package!) and supplied datasets::AirPassengers as the x argument (I mistakenly thought it was a data frame and not a time series).

visdat::vis_dat(AirPassengers)

The error returned was:

Error in if (ncol(x) * nrow(x) > large_data_size && warn_large_data) { :
missing value where TRUE/FALSE needed

I was wondering if it would be worth having an error message which warns the user that they should be supplying a data.frame object?

(Happy to submit a PR myself if you'd like)

Hello!

Thanks for writing an issue :)

I think that this is a great idea, I would welcome a PR for this, let me know if you want a hand with anything :)

Thanks! :) I think I've done it - but as this is my second ever PR and I'm giving a talk soon about submitting PRs for newbies, any feedback is welcomed (with pedantry actively encouraged!)