Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dust() does not allow 1 column tables #123

Open
charlieflipside opened this issue Nov 30, 2022 · 0 comments
Open

dust() does not allow 1 column tables #123

charlieflipside opened this issue Nov 30, 2022 · 0 comments

Comments

@charlieflipside
Copy link

charlieflipside commented Nov 30, 2022

# works
dust(mtcars) %>% sprinkle_print_method("console")

mpg cyl disp hp drat wt qsec vs am gear carb
1 21 6 160 110 3.9 2.62 16.46 0 1 4 4
2 21 6 160 110 3.9 2.875 17.02 0 1 4 4

# error
dust(mtcars[, "mpg"]) %>% sprinkle_print_method("console")

Error in .rbind_internal(if (nrow(head) > 1) subhead else NULL, body[Divisions$row_num[Divisions$div_num == : All objects in ... must be data frames

Similarly:

# error
dust(
  data.frame(
      col1 = "hi"
  )
) %>% sprinkle_print_method("console")

Error in .rbind_internal(if (nrow(head) > 1) head[-1, ] else NULL, body[Divisions$row_num[Divisions$div_num == : All objects in ... must be data frames

# works
dust(
  data.frame(
      col1 = "hi",
      col2 = "hello"
  )
) %>% sprinkle_print_method("console")

col1 col2
1 hi hello

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant