### Open Source Your Knowledge, Become a Contributor

When R starts it executes the function .First in ~/.Rprofile (if it exists). Similarly, R executes the function .Last in the same file at the end of any R. Here's an example of how to customize your R environment: