[R-pkg-devel] Need to call strptime() with specific LC_TIME
Joshua Ulrich
josh.m.ulrich at gmail.com
Mon Apr 10 23:36:32 CEST 2017
Hi,
I'm looking for any guidance/best-practices about how to deal with an
issue a quantmod user ran into an issue when calling
getSymbols.google():
https://github.com/joshuaulrich/quantmod/issues/140
Google provides a CSV where the dates are specified using English
month abbreviations. Converting the characters to Date does not work
in any locale that doesn't use those abbreviations.
So I need to call strptime() in a locale that uses English month
abbreviations. Is there a better solution than this?
lc_time <- Sys.getlocale("LC_TIME")
Sys.setlocale(category = "LC_TIME", locale = "C")
on.exit(Sys.setlocale(category = "LC_TIME", locale = lc_time)
Thanks!
--
Joshua Ulrich | about.me/joshuaulrich
FOSS Trading | www.fosstrading.com
R/Finance 2017 | www.rinfinance.com
More information about the R-package-devel
mailing list