Coder Social home page Coder Social logo

Comments (4)

alastairrushworth avatar alastairrushworth commented on August 24, 2024

Hi @joniarroba thanks for the feedback.

It looks like the column author is causing the issue. So I can identify the issue, could you paste the output of the following commands:

  • table(df$author, useNA = 'ifany')
  • levels(df$author)
  • rlang::last_error()

Thanks.

from inspectdf.

joniarroba avatar joniarroba commented on August 24, 2024

Hi @alastairrushworth , thanks for the support, here we go with the messages!

First

table(df$author, useNA = 'ifany')

‎ vazio joni nubia ‎vazio vazio
0 42333 36195 0 0

Second

levels(df$author)
[1] "‎ vazio" "joni" "nubia" "‎vazio" "vazio"

Third

rlang::last_error()

message: Tibble columns must have consistent lengths, only values of length one are recycled:

  • Length 8: Column value
  • Length 12: Column prop
    class: rlang_error
    backtrace:
  1. inspectdf::inspect_cat(whats)
  2. inspectdf:::fast_table(df_cat[[i]], show_na = TRUE, show_cnt = TRUE)
  3. tibble::tibble(value = vals, prop = freq/length(v))
  4. tibble:::lst_to_tibble(xlq$output, .rows, .name_repair, lengths = xlq$lengths)
  5. tibble:::recycle_columns(x, .rows, lengths)
    Call rlang::last_trace() to see the full backtrace

In the mean I while find a way to solve it!

from inspectdf.

alastairrushworth avatar alastairrushworth commented on August 24, 2024

Hi @joniarroba thanks for the update! Glad you've found a way to solve this.

I think the problem is because there are duplicated factor levels in df$author - vazio appears twice in levels(df$author). I think think you can fix this by resetting the levels using something like

levels(df$author) <- unique(levels(df$author))

In the meantime, I'll open a new issue to handle this internally with a warning in inspectdf.

Thanks!

from inspectdf.

alastairrushworth avatar alastairrushworth commented on August 24, 2024

I've added a factor check to the GH version of the package. So hopefully this fixes the problem you were having. Thanks!

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.