dear Jeff,
                 THanks for your reply. Would you not recommend this  solution 
too : 
https://stackoverflow.com/questions/49738564/r-set-environment-variable-permanently
 ?

THanking you,
Yours sincerely,
AKSHAY M KULKARNI

________________________________
From: Jeff Newmiller <jdnew...@dcn.davis.ca.us>
Sent: Wednesday, December 7, 2022 10:44 PM
To: r-help@r-project.org <r-help@r-project.org>; akshay kulkarni 
<akshay...@hotmail.com>; R help Mailing list <r-help@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...@hotmail.com> 
wrote:
>Dear members,
>                             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?
>
>Thanking you,
>Yours sincerely,
>AKSHAY M KULKARNI
>
>       [[alternative HTML version deleted]]
>
>______________________________________________
>R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>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.

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to