Error in as.POSIXlt.POSIXct (x, tz): (converted from warning) unknown time zone 'GMT'

I am facing a problem for which I cannot find the key to the solution, which makes it very difficult for this. Here: In R (with R-Studio), I am trying to create a Date Object with a library lubridate:

library(lubridate)
ymd(20161001)

which leads to an error:

Error in as.POSIXlt.POSIXct (x, tz): (converted from warning) unknown time zone 'GMT'

The second run (and any subsequent runs) of the last command gives the correct result:

ymd(20161001)
[1] "2016-01-01"

until I restart my R-session when again the first start raises an error. I checked a few settings, but I can not find anything changing from the first to the second. Here, for example, is my conclusion sessionInfo():

R version 3.3.2 (2016-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=Dutch_Netherlands.1252  LC_CTYPE=Dutch_Netherlands.1252    LC_MONETARY=Dutch_Netherlands.1252 LC_NUMERIC=C                      
[5] LC_TIME=Dutch_Netherlands.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] lubridate_1.6.0

loaded via a namespace (and not attached):
[1] magrittr_1.5  tools_3.3.2   stringi_1.1.2 stringr_1.1.0

Sys.timezone()says [1] "Europe/Berlin"but Sys.getenv('TZ')empty:""

, , , , .

+4
3

​​ . Rmarkdown, tufte_html. :

library(lubridate)
library(tidyverse)
library(stringr)
library(extrafont)
library(extrafontdb)
library(tufte)

, : -, VPN, , , , , Wi-Fi VPN. , . Macbook , . , script, tidyverse , :

library(lubridate)
library(tibble)
library(dplyr)
library(readr)
library(extrafont)
library(extrafontdb)
library(tufte)

Rmarkdown html . , , , tidyverse, , . - ?


, :

R version 3.4.2 (2017-09-28)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.1

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] tufte_0.2       extrafontdb_1.0 extrafont_0.17  stringr_1.2.0  
[5] readr_1.1.1     dplyr_0.7.4     tibble_1.3.4    lubridate_1.7.1

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.13     Rttf2pt1_1.3.4   knitr_1.17       bindr_0.1       
 [5] magrittr_1.5     hms_0.3          R6_2.2.2         rlang_0.1.4     
 [9] tools_3.4.2      htmltools_0.3.6  yaml_2.1.14      rprojroot_1.2   
[13] digest_0.6.12    assertthat_0.2.0 bindrcpp_0.2     glue_1.2.0      
[17] evaluate_0.10.1  rmarkdown_1.8    stringi_1.1.6    compiler_3.4.2  
[21] backports_1.1.1  pkgconfig_2.0.1
0

.

Sys.setenv(TZ='America/Detroit') script, .

0
0

Source: https://habr.com/ru/post/1669295/


All Articles