문제

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