1

This is a specific issue of the following dev version of dbplyr:

devtools::install_github("tidyverse/dbplyr", ref = devtools::github_pull(72)) developed by @edgararuiz

It seems to me that the spread function doesn't work properly...

df_sample <- tribble(~group1, ~group2, ~group3, ~identifier, ~value, 
                      8, 24, 6, 'mt_0', 
                      12, 18, 24, 6, 'mt_1', 4)

con <- DBI::dbConnect(RSQLite::SQLite(), ":memory:")
df_db <- copy_to(con, df_sample, 'df_sample')

I obtained an incorrect result with the following command. There should've been only one row of data after spread.

df_db %>% spread(identifier, value)

enter image description here

The result is correct if the original data is downloaded to local memory.

df_db %>% collect() %>% spread(identifier, value)

enter image description here

Anybody has any idea? Also, I am not sure how I can reach @edgarauiz. Appreciate it if somebody could let him know. Thanks!

Jin
  • 103
  • 6
  • 1
    Leave a note on the [Github issues page](https://github.com/tidyverse/dbplyr/issues) – Rich Scriven Oct 10 '18 at 23:42
  • I'd love to. For some reason I can't create an account on GitHub. The account creation process is always stuck at step 1: Create a personal account... – Jin Oct 10 '18 at 23:44

1 Answers1

1

I just port this over to GitHub. Will let the author handle this.

Jin
  • 103
  • 6