سؤال

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!

هل كانت مفيدة؟

المحلول

You can use a pipe

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

that on your system shoud give "EDT"

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top