[R-pkg-devel] Best practices for CRAN package using Go

2023-07-06 Thread Dewey Dunnington
Hi all, I'm wondering if there is any precedent for using Go in a CRAN R package. Go is a particularly good language for writing database drivers for the Arrow Database Connectivity framework [1][2] and - importantly - there are several active developers writing these drivers from which R

Re: [R-pkg-devel] Warning 'as.data.frame.POSIXct()' is deprecated

2023-07-06 Thread Tim Taylor
Ah yes ... and reading the as.data.frame help we see (emphasis mine): "... Direct calls to as.data.frame.() are still possible (*base package!*), for 12 atomic base classes, but will deprecated ..." So it does seem that a lot of these warnings are triggered by base R and updating this code

Re: [R-pkg-devel] Warning 'as.data.frame.POSIXct()' is deprecated

2023-07-06 Thread Vincent van Hees
Thanks Dirk, My plan will then be to revise my package to avoid using POSIXlt when POSIXct is also sufficient, given that I am storing timestamps in data.frames a lot. In the few instances where POSIXlt may be necessary I will avoid storing them in a data.frame. Vincent On Thu, 6 Jul 2023 at

Re: [R-pkg-devel] Warning 'as.data.frame.POSIXct()' is deprecated

2023-07-06 Thread Enrico Schumann
On Thu, 06 Jul 2023, Vincent van Hees writes: > Thanks, in that case the REPLEX for the issue may need to be: > >> remember = Sys.getenv("_R_CHECK_AS_DATA_FRAME_EXPLICIT_METHOD_") >> Sys.setenv("_R_CHECK_AS_DATA_FRAME_EXPLICIT_METHOD_" = TRUE) >> data.frame(time = Sys.time()) >

Re: [R-pkg-devel] Warning 'as.data.frame.POSIXct()' is deprecated

2023-07-06 Thread Dirk Eddelbuettel
On 6 July 2023 at 08:14, Dirk Eddelbuettel wrote: | | On 6 July 2023 at 14:31, Vincent van Hees wrote: | | Thanks, in that case the REPLEX for the issue may need to be: | | | | > remember = Sys.getenv("_R_CHECK_AS_DATA_FRAME_EXPLICIT_METHOD_") | | >

Re: [R-pkg-devel] Warning 'as.data.frame.POSIXct()' is deprecated

2023-07-06 Thread Dirk Eddelbuettel
On 6 July 2023 at 14:31, Vincent van Hees wrote: | Thanks, in that case the REPLEX for the issue may need to be: | | > remember = Sys.getenv("_R_CHECK_AS_DATA_FRAME_EXPLICIT_METHOD_") | > Sys.setenv("_R_CHECK_AS_DATA_FRAME_EXPLICIT_METHOD_" = TRUE) | > data.frame(time = Sys.time()) |

Re: [R-pkg-devel] Warning 'as.data.frame.POSIXct()' is deprecated

2023-07-06 Thread Vincent van Hees
Thanks, in that case the REPLEX for the issue may need to be: > remember = Sys.getenv("_R_CHECK_AS_DATA_FRAME_EXPLICIT_METHOD_") > Sys.setenv("_R_CHECK_AS_DATA_FRAME_EXPLICIT_METHOD_" = TRUE) > data.frame(time = Sys.time()) time 1 2023-07-06 14:29:37 > data.frame(time =

Re: [R-pkg-devel] Warning 'as.data.frame.POSIXct()' is deprecated

2023-07-06 Thread Tim Taylor
Apologies - I've not had enough caffeine just yet. The reprex below highlights the issue but I think the code which implemented the change *may* need tweaking not lapply. Tim On 06/07/2023 09:26, Tim Taylor wrote: This *may* be an issue in lapply.  Let's see what others day. Reprex below

Re: [R-pkg-devel] Warning 'as.data.frame.POSIXct()' is deprecated

2023-07-06 Thread Tim Taylor
This *may* be an issue in lapply.  Let's see what others day. Reprex below Sys.setenv("_R_CHECK_AS_DATA_FRAME_EXPLICIT_METHOD_" = TRUE) dat <- Sys.Date() as.data.frame(dat) #>  dat #> 1 2023-07-06 lapply(dat, as.data.frame) #> Warning: Direct call of 'as.data.frame.Date()' is deprecated. 

[R-pkg-devel] Warning 'as.data.frame.POSIXct()' is deprecated

2023-07-06 Thread Vincent van Hees
Dear all, I see the following warning in my package test results: ``` Warning Direct call of 'as.data.frame.POSIXct()' is deprecated. Use 'as.data.frame.vector()' or 'as.data.frame()' instead ``` The warning is not always there and I struggle to make it reproducible. I have encountered it in