You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Nicola Crane (Jira)" <ji...@apache.org> on 2022/09/20 13:48:00 UTC
[jira] [Commented] (ARROW-17781) [R] "floor_date()" function from Lubridate Library
[ https://issues.apache.org/jira/browse/ARROW-17781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17607209#comment-17607209 ]
Nicola Crane commented on ARROW-17781:
--------------------------------------
Thanks for the information! Just an FYI, it makes it a little bit easier to diagnose these issues if you supply a short reproducible code example (like the one I'm about to paste below), rather than a screenshot of the code. However, no problem here, as I think I know what the issue is!
In version 9.0.0 we don't yet support the ability to call functions in Arrow with their package prefix. If you call it just as {{floor_date}} instead of {{lubridate::floor_date()}}, this should hopefully work. I've pasted a short reproducible example for you below.
{code:r}
library(dplyr)
library(arrow)
df <- tibble::tibble(x = as.POSIXct("2022-09-20 14:40:46 BST"))
df %>%
arrow_table() %>%
mutate(t = floor_date(x, unit = "15 min")) %>%
collect()
{code}
In version 10.0.0 we'll be supporting the ability to call functions including the package prefix - this was completed in the dev version in ARROW-14575.
> [R] "floor_date()" function from Lubridate Library
> --------------------------------------------------
>
> Key: ARROW-17781
> URL: https://issues.apache.org/jira/browse/ARROW-17781
> Project: Apache Arrow
> Issue Type: Improvement
> Components: R
> Reporter: N Gautam Animesh
> Priority: Major
> Attachments: image.png
>
>
> I was trying to use the floor_date() function from the Lubridate Library but somehow I wasn't able to get the desired outputs.
> Do let me know if there is an implementation for the same in Arrow. Or some other work around.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)