4

Running RStudio 1.2.5033, R 3.6.1, and readr 1.3.1.

Previously was having no issues reading in a CSV file yesterday, software was updated to what you see above and now getting

Error: Unknown TZ UTC

when I try to read in anything with

table.df <- read_csv('csv_file.csv')

I found this post and have explored locale as a chunk/file/global option (specific and default) without success. I am from the USA and have tried every time zone they list in the help. Even tried

options(readr.default_locale=readr::locale(tz="Australia/Sydney"))

and I get

Error: Unknown TZ Australia/Sydney

I don't manage this instance as it's running on a remote cluster and sysadmin kicked me off today to update a number of softwares including R. I've run all package updates. Sysadmin is smart and doesn't tinker with too much and I haven't changed any global settings so I'm not sure what this might be. Hoping I'm an idiot and I'm just missing an easy fix.

JBP
  • 83
  • 9
  • Alright y'all. I spun up a local version of this problem and figured out the base R version referenced by RStudio (3.6.1) and the newly installed one (3.6.3) were not the same. I saw R was installed, but there was no indication it wasn't linked up. If anyone ends up on this post and has this issue in the future, you simply need to open the new version of base R (which I don't think I've intentionally done in the past) and it will be referenced properly. Confirmed: I am an idiot. – JBP Apr 02 '20 at 03:35
  • Do you have `xts` installed? Not sure why I ask but time zones seem to come up today , though in xts, tzone is tz. But no, I find readr doesn't use `xts`, but `hms` which is a great time package. And readr says `designed to flexibly parse many types of data found in the wild, while still cleanly failing when data unexpectedly changes.` Cleanly failing might suggest your data inbound changed or perhaps `hms`, as it cleanly failed. Probably unknowable, sys admins being what they are, but version changes over the upgrade, and your work enviro before and after? – Chris Apr 02 '20 at 03:38
  • Nope, you're not an idiot. You had a problem, investigated. Asked, Checked, Resolved. Now, you have both an opportunity and one should say obligation to Report. So, answer your own question. Get some points. And don't leave a dangling not quite dry hole here. My thoughts. – Chris Apr 02 '20 at 03:42
  • Appreciate your response, Chris. It seems my R-RStudio connection wasn't quite right after the update. Had never run into that problem before but here we find ourselves. I typically use lubridate for dates but will definitely check out xts and hms--always up for a new tool in the chest. – JBP Apr 02 '20 at 03:47

1 Answers1

4

I spun up a local version of this problem and figured out the base R version referenced by RStudio (3.6.1) and the newly installed one (3.6.3) were not the same. I saw R was installed, but there was no indication it wasn't linked up. If anyone ends up on this post and has this issue in the future, you simply need to open the new version of base R (which I don't think I've intentionally done in the past) and it will be referenced properly.

JBP
  • 83
  • 9
  • And accept your answer and you've completed the community process. As we say,"Welcome to Stackoverflow". – Chris Apr 02 '20 at 04:30
  • 1
    Thanks for the welcome. I "can accept my own answer in 13 hours" according to stack overflow--ha! I will do this when I'm able to close things out. – JBP Apr 03 '20 at 13:40