TPDeramus commented on issue #38473:
URL: https://github.com/apache/arrow/issues/38473#issuecomment-1781550569

   I think the following would work:
   
   `Terms <- DOI |> filter(treatment_flag == 0, comparator_flag == 0)|> 
group_by(Participant) |> select(c("EMPI_Indexdt",starts_with("term_"))) |> 
select(!contains("term_names")) |> mutate(across(starts_with("term_"), ~ 
coalesce(.x, 0))) |> summarise(across(select(starts_with("term_"), ~ sum)) |> 
collect() |> as.data.frame()`
   
   But that seems to throw:
   ```
   Error: Error : Cannot infer type from vector
   Call collect() first to pull data into R.
   ```
   
   At the `summarize` phase.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to