Pregunta

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!

¿Fue útil?

Solución

You can use a pipe

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

that on your system shoud give "EDT"

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top