Code Monkey home page Code Monkey logo

Comments (5)

krlmlr avatar krlmlr commented on June 12, 2024

How about silently stripping the .Dim attribute in this case? The outputs of 1:3 and array(1:3) are indistinguishable, but:

> dput(array(1:3))
structure(1:3, .Dim = 3L)

from tibble.

hadley avatar hadley commented on June 12, 2024

I think that's reasonable - generally we prefer to complain about bad column types, but this is such a simple transformation it seems ok to be helpful.

from tibble.

jennybc avatar jennybc commented on June 12, 2024

I think I just stumbled into this test driving the new mutate_*() functions? I forgot scale() returns a matrix. Here's a really easy way to create a problematic tibble:

iris %>% select(-Species) %>% mutate_each(funs(scale))

Everything seems OK, you can print, str(), View(). But if you use group_by() the wheels start to come off the wagon. You cannot View() this.

iris %>% group_by(Species) %>% mutate_each(funs(scale))

It's even easier to create strange tibbles with mutate_all(), mutate_if(), mutate_at(). I made something I can't str().

from tibble.

krlmlr avatar krlmlr commented on June 12, 2024

Should be fixed with devtools::install_github("krlmlr/dplyr@b-1918-grouped-dims") .

from tibble.

github-actions avatar github-actions commented on June 12, 2024

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.

from tibble.

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.