You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use tidyverse, and bc its a dependency for many packages, frankly, it's not really a choice.
The problem
The global namespace often gets crowded with lot's of unneccesary variables.
This is a problem with autocomplete, bc rarely used items, often takes precedence over key base functions, for example
typing ta and hit autocomplete should result in table(), but once I load tidyr the default complete becomes table1 which is some random example datset
Another example r is pr autocompletes to presidential instead of print().
I believe most people use these example datasets much much less frequently then core functions.
Such namespace crowding makes autocomplete often useless, thus shaving off minutes every working hour.
Examples
Looking for a solution
Not loading tidyverse packages is not a reasonable option
I cannot remove by rm(table1), it stays
I can manually overwrite a long list of these with table1 <- NULL, which makes it disappear from the autocomplete list, but they stay in global namespace
How would you deal with this? Do u have a better solution?
What would be a better long term solution
I think many package creators are lenient and spam the workspace (I am no exception). At least the separation of data objects should be loadable independently, such as done for Seurat and SeuratData. For a lack of a better idea, I would like to propose that you separate tidyr and tidyrData, or tidyverseData into separate packages. I use tidyverse every day, I don't think I ever used these data objects.
Thank you for your time!
ps. you can see another bug on the screenshot: displayed package assignment is often wrong (in RstudioServer Desert Rose): prcomp is from stats and not from MarkdownReports.
The text was updated successfully, but these errors were encountered:
hadley
changed the title
Solutions for a crowded and spammed namespace: selective removal of items? Any better ideas?
Solutions for a crowded namespace: selective removal of items? Any better ideas?
Mar 14, 2024
Hello,
I use tidyverse, and bc its a dependency for many packages, frankly, it's not really a choice.
The problem
The global namespace often gets crowded with lot's of unneccesary variables.
This is a problem with autocomplete, bc rarely used items, often takes precedence over key base functions, for example
ta
and hit autocomplete should result intable()
, but once I loadtidyr
the default complete becomestable1
which is some random example datsetpr
autocompletes topresidential
instead ofprint()
.Examples
Looking for a solution
Not loading tidyverse packages is not a reasonable optionI cannot remove by rm(table1), it staystable1 <- NULL
, which makes it disappear from the autocomplete list, but they stay in global namespaceWhat would be a better long term solution
Seurat
andSeuratData
. For a lack of a better idea, I would like to propose that you separatetidyr
andtidyrData
, ortidyverseData
into separate packages. I use tidyverse every day, I don't think I ever used these data objects.Thank you for your time!
ps. you can see another bug on the screenshot: displayed package assignment is often wrong (in RstudioServer Desert Rose):
prcomp
is fromstats
and not fromMarkdownReports
.The text was updated successfully, but these errors were encountered: