See
?.Last
for information on how to cause something to happen when R exits.
(whether R Studio overrides this I don't know)
-Don
--
Don MacQueen
Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062
On 8/13/16, 1:02 PM, "R-help on behalf of Jan Kacaba"
<r-help-bounces at r-project.org on behalf of jan.kacaba at gmail.com>
wrote:
>Dear R help,
>
>I would like to run script upon saving project files or exiting the R
>Studio.
>For example I would like to backup whole project in another directory.
>The backup directory should be named such that incremental version
>number will added to project name.
>
>Is it somehow possible? Even better would be if someone can also
>quickly go through file versions.
>
>______________________________________________
>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.