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 at
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 at 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.