> I do see I have weeks of codes in my console when I check with my arrow up > keys. I have been clearing them with Control L but it seems to clear it > clear the screen temporally.
CTRL-L simply clears the screen and not the history. > I do see the previous codes again when I open R > the next day, after quitting the session! > > Q: > How do I clear this? What you are seeing is the R history which is stored in the file .Rhistory in the current working directory when the session is closed or savehistory() is used. Deleting that file before starting R will "clear" the history. I am not sure you can clear the history of a running R session. Deleting the file will not work while the session is open because the history is in memory at that time and I am not aware of a command to manipulate the current history. The environment variable R_HISTSIZE can be used to control the size of the history. see ?history for details. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan Maximus-von-Imhof-Forum 3 85354 Freising, Germany http://webclu.bio.wzw.tum.de/~pagel/ ______________________________________________ R-help@r-project.org mailing list 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.