Giter Site home page Giter Site logo

Better RMarkdown functionality about skimr HOT 3 CLOSED

ropensci avatar ropensci commented on July 18, 2024
Better RMarkdown functionality

from skimr.

Comments (3)

elinw avatar elinw commented on July 18, 2024

I think part 1 of your issue is already known and referenced in the "skim_print() doesn't work for classes other than numeric, factor or character" issues #71. If you test the skim_print() refactor code #101 this is addressed.

Yes the output is a list of tibbles one for each variable type which is the design given that the columns are (potentially) different for each type. If you have a thought about a different way of handling that it would be great to explain, but my suggestion is to use the skim object as the basis for building a custom print method. This aspect of the package makes it really flexible. One could also merge the tibbles and just have NA for the statistics that don't apply for the type.

My issue with the markdown is what I think you are saying in the last paragraph. The way the tables are wrapping in the console is somewhat a matter of preference (you can modify that just like for any tibble by changing the width to Inf), but when I knit to html I really don't think that wrapping is helpful (what's the point of knitting to results you will hide) and I'd rather either have full width with a horizontal scroll or degrade the table gracefully so that the data are shown underneath.

from skimr.

puterleat avatar puterleat commented on July 18, 2024

Another potential issue here is that in RStudio RMarkdown document this prints a sequence of data frames:

skim(mtcars)

The columns of which are var, type, missing, etc. But this fails because the actual return value is the tidy dataframe:

skim(mtcars) %>% select(var, mean, sd)

I had to write names(skim(mtcars)) to work out what was going on. I'm not sure if this is a problem with skimr or Rstudio though.

from skimr.

elinw avatar elinw commented on July 18, 2024

I think you are mixing together the skim object (which has a long, vertical structure) and the skim print object (which has a wide, horizontal structure separated out by type (in a list)). The type separation in the print object is because each type has a different set of functions (e.g. factors return different things than numeric). If you review the readme file it explains a lot of this.

from skimr.

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.