I used the function gc() when the RAM looks like it is going RED and the message that I received is Mb Ncells 284.8 and Vcells 459.9.
What does that mean, especially after I just saved 8GB of memory to RStudio with their $25.00 a month subscription plan.
R, following lisp language heritage, is based on S expressions. S expressions are a tree-like structure that can be represented with "lists".
list(1, 2, 3)is a list of three numbers. List can also contain lists as inlist(1, list(3, 4), 5), forming a tree of lists. At lower level, lists can be seen as acons. Aconsis a pair (data, other cons), list(1, othercons). Ncells are thosecons. In R,consare called Node cells (Ncells) (they are in fact slightly more complicated than that but it does not matter for the sake of basic explanation).gc()Ncells returns the number ofNcellsused and the space occupied by them, expressed in Mb.max usedgives the maximum usage reached during your current session.Vcellsare a special type of cells to hold more efficiently list of the same element type (aka vectors).Vcellsreports the number of those cells and the space in Mb occupied by them.gc triggerreports the thresholds when the next garbage collection will be run.It means that you use 284.8 Mega bytes and 459.9 Mega bytes.
8GB = 8000 MB, that is a lot more than what you are using.