[R] setting timezone variable permanently...
@k@h@y_e4 @end|ng |rom hotm@||@com
Wed Dec 7 18:40:41 CET 2022
thanks a lot....
AKSHAY M KULKARNI
From: Jeff Newmiller <jdnewmil using dcn.davis.ca.us>
Sent: Wednesday, December 7, 2022 11:03 PM
To: akshay kulkarni <akshay_e4 using hotmail.com>; r-help using r-project.org <r-help using r-project.org>
Subject: Re: [R] setting timezone variable permanently...
As I said, the tz is linked to your data, not where you OR your compute server are, so setting TZ in your R code or specifying it as the tz argument when you convert it are the best options.
If you choose to use your OS to set it that is up to you... but your code should not depend on that setting either way.
On December 7, 2022 9:19:40 AM PST, akshay kulkarni <akshay_e4 using hotmail.com> wrote:
> THanks for your reply. Would you not recommend this solution too : https://stackoverflow.com/questions/49738564/r-set-environment-variable-permanently ?
>AKSHAY M KULKARNI
>From: Jeff Newmiller <jdnewmil using dcn.davis.ca.us>
>Sent: Wednesday, December 7, 2022 10:44 PM
>To: r-help using r-project.org <r-help using r-project.org>; akshay kulkarni <akshay_e4 using hotmail.com>; R help Mailing list <r-help using r-project.org>
>Subject: Re: [R] setting timezone variable permanently...
>Technically this is a question regarding your operating system, since environment variables are propagated by the OS creation of processes and different OSes include different mechanisms for configuring them.
>However, for practical purposes in R you can just put that statement into your .Rprofile file.
>I would not recommend it though... rather you should include this statement in every script that depends on this assumption. Otherwise your script will have a hidden configuration dependency. In fact the timezone you set should be linked with the data files you are using... if you work with time data from different places then you should set it appropriately for that data at the point in your script where you do the import.
>On December 7, 2022 8:47:20 AM PST, akshay kulkarni <akshay_e4 using hotmail.com> wrote:
>> I am setting the Time zone environment variable by this code:
>>> Sys.setenv(TZ = "Asia/Kolkata")
>>But I have to run it every time I open a new R session. How do I set it permanently?
>>AKSHAY M KULKARNI
>> [[alternative HTML version deleted]]
>>R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>>PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>>and provide commented, minimal, self-contained, reproducible code.
>Sent from my phone. Please excuse my brevity.
Sent from my phone. Please excuse my brevity.
[[alternative HTML version deleted]]
More information about the R-help