Code Monkey home page Code Monkey logo

Comments (4)

alastairrushworth avatar alastairrushworth commented on May 26, 2024

Hi @biodavidjm thanks for your message.

Firstly, the show_plot = TRUE option is deprecated and is going to be removed from a future release of the package. If you aren't seeing a warning when you use the option, then you may be using an older version of the package - if so I'd recommend updating.

That being said, it may be that the show_plot() function doesn't give you what you want. Can you give a bit more detail (ideally an example too) about what you'd like to see?

Thanks!

from inspectdf.

biodavidjm avatar biodavidjm commented on May 26, 2024

You are right, in fact, I was using the functions as recommended, i.e.,

inspectdf::inspect_na(df) %>% show_plot()

but before sending you the question I explored the help and noticed that I could also use the show_plot as an argument inside that function (and yes, I got the soon deprecated message)

Coming back to your question, the sorted barplot is useful, but having the option of an unsorted barplot would be very useful as well. For example, some data frames might have a very well defined structure and particular column order well-known by a particular community of users. And just plotting the barplot keeping the order of the original data frame would be easy to illustrate what columns are coming with a large number of NA values (if using the inspect_na function). In summary, to have an extra argument sort_barplot = FALSE would be helpful, i.e.

inspectdf::inspect_na(df) %>% show_plot(sort_barplot = FALSE)

... leaving TRUE as default

from inspectdf.

alastairrushworth avatar alastairrushworth commented on May 26, 2024

Hi @biodavidjm

Ok I see what you mean. I think this might be possible just by adding an arrange() after the inspect_ statement:

library(inspectdf)
library(dplyr)

starwars %>% 
  inspect_na() %>% 
  arrange(match(col_name, colnames(starwars))) %>%
  show_plot()

Does that help, or are you looking at something more complex than this?

from inspectdf.

biodavidjm avatar biodavidjm commented on May 26, 2024

Yes! it does the trick! thanks a lot

from inspectdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.