Question

I would like to read the timezone of an Ubuntu Server into an R character class object for an R Shiny Application. If I type:

date +%Z

into my Ubuntu terminal, I get

EDT

How might I read this into R?

Thank you!

Était-ce utile?

La solution

You can use a pipe

> con <- pipe("date +%Z")
> readLines(con)
[1] "CEST"

that on your system shoud give "EDT"

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top