[R] is.na(strptime (...)) return TRUE on FreeBSD

Jinsong Zhao j@zh@o @end|ng |rom ye@h@net
Fri May 12 00:27:00 CEST 2023



On 2023/5/12 1:34, Rainer Hurling wrote:
> Am 11.05.23 um 16:15 schrieb Jinsong Zhao:
>> Hi there,
>>
>> The following codes may cause the problem in R 4.3.0 on FreeBSD in my 
>> last post: Error in as.POSIXlt.character(x, tz, ...)
>>
>>  > (d <- strptime("1970-01-01 12:00:00 UTC", "%Y-%m-%d %H:%M:%OS", tz 
>> = ""))
>> [1] "1970-01-01 12:00:00 CST"
>>  > is.na(d)
>> [1] TRUE
>>
>> In R 4.3.0 on windows,
>>
>>  > (d <- strptime("1970-01-01 12:00:00 UTC", "%Y-%m-%d %H:%M:%OS", tz 
>> = ""))
>> [1] "1970-01-01 12:00:00 CST"
>>  > is.na(d)
>> [1] FALSE
>>
>> The only difference is the result of is.na().
>>
>> Best,
>> Jinsong
>
> I can't confirm, that is.na(d) returns TRUE on FreeBSD. On my boxes it 
> always gives
>
>   > (d <- strptime("1970-01-01 12:00:00 UTC",
>                    "%Y-%m-%d %H:%M:%OS", tz = ""))
>   [1] "1970-01-01 12:00:00 CET"
>   > is.na(d)
>   [1] FALSE
>
>
> # uname ...
> 14.0-CURRENT FreeBSD 14.0-CURRENT #0 main-n262658-b347c2284603: Sat 
> Apr 29 11:20:31 CEST 2023
>
> Best wishes,
> Rainer
>
I am on a FreeBSD 13.2-RELEASE.

|> sessionInfo() R version 4.3.0 (2023-04-21) Platform: 
amd64-portbld-freebsd13.1 (64-bit) Running under: FreeBSD xw6600 
13.2-RELEASE FreeBSD 13.2-RELEASE releng/13.2-n254617-525ecfdad597 
GENERIC amd64 ||Matrix products: default LAPACK: 
/usr/local/lib/R/lib/libRlapack.so.4.3.0; LAPACK version 3.11.0 locale: 
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 time 
zone: Asia/Shanghai tzcode source: system (FreeBSD) attached base 
packages: [1] stats graphics grDevices utils datasets methods base 
loaded via a namespace (and not attached): [1] compiler_4.3.0|||



More information about the R-help mailing list