For projects that create many data frames and objects in a linear(ish) order, what is the best practice for organization? Is there a better solution than prefixes? Is there an add-in that can tag data frames with metadata + a sortable library?
No there is not, but one thing to consider is that if you have many similar objects you should put them in a
So the data frames
data2016 should rather be something like
birdsightings <- list("2015" = ..., "2016" = ...). Especially since you mention prefixes, that really sounds like you would rather want a list of
You can add attributes or comments to
data.frames in base R, but i never found that concept particularly useful (see help on
?comment). I prefer to have my objects documented in the scripts that creates them.
I guess (long-term) what I'm imaging is a file explorer similar to an OS. In the Environment window, in addition to the data frame / tibble name and dimensions, there's additional data including:
- Which script file (or in the console) the df was created
- The chunk name and/or line number
- User notes that are retained when you overwrite the dataframe with one of the same name.
For now, you're right that lists can be cleaner, especially with the more recent list tools in the tidyverse.