Try this (see ?detach
for more details):
detach("package:vegan", unload=TRUE)
It is possible to have multiple versions of a package loaded at once (for example, if you have a development version and a stable version in different libraries). To guarantee that all copies are detached, use this function.
detach_package <- function(pkg, character.only = FALSE) { if(!character.only) { pkg <- deparse(substitute(pkg)) } search_item <- paste("package", pkg, sep = ":") while(search_item %in% search()) { detach(search_item, unload = TRUE, character.only = TRUE) } }
Usage is, for example
detach_package(vegan)
or
detach_package("vegan", TRUE)
Related Posts:
- What is the difference between require() and library()?
- How to find out which package version is loaded in R?
- do-while loop in R
- Use of ~ (tilde) in R programming Language
- How to install pip with Python 3?
- Relative imports – ModuleNotFoundError: No module named x
- Relative imports – ModuleNotFoundError: No module named x
- “pip install unroll”: “python setup.py egg_info” failed with error code 1
- “pip install unroll”: “python setup.py egg_info” failed with error code 1
- How can I solve “java.lang.NoClassDefFoundError”?
- What is __init__.py for?
- What is __init__.py for?
- beyond top level package error in relative import
- Counting the number of elements with the values of x in a vector
- beyond top level package error in relative import
- ModuleNotFoundError: No module named ‘sklearn’
- beyond top level package error in relative import
- ModuleNotFoundError: No module named ‘sklearn’
- What is a Python egg?
- Plot multiple lines in one graph
- Replace a value in a data frame based on a conditional (`if`) statement
- How to read in .HTM into R as a data frame?
- Create empty data frame with column names by assigning a string vector?
- Python error: AttributeError: ‘module’ object has no attribute
- Changing font size and direction of axes text in ggplot2
- How to randomize ggplot factor color scheme, keeping same default distances on color wheel?
- Java Package Does Not Exist Error
- Count number of occurences for each unique value
- Warning message: line appears to contain embedded nulls [duplicate]
- Python 3: ImportError “No Module named Setuptools”
- Find duplicate values in R
- How to change line width in ggplot?
- Error in library(ggplot2) : There is no package called ‘ggplot2’
- Transpose a data frame
- How to drop columns by name in a data frame
- How to reshape data from long to wide format
- What’s the difference between a Python module and a Python package?
- Change size of axes title and labels in ggplot2
- Multiple If Statements in R
- ggplot geom_text font size control
- What’s the difference between lapply and do.call?
- ggplot2, change title size
- Combine two or more columns in a dataframe into a new column with a new name
- Find the version of an installed npm package
- How to fix “Attempted relative import in non-package” even with __init__.py
- Download TS files from video stream
- Initial value in ‘vmmin’ is not finite even when changing the starting value
- Insert picture/table in R Markdown
- Test if a vector contains a given element
- R “Error: unexpected ‘}’ in “}”
- How to remove outliers from a dataset
- Insert a blank column in dataframe
- “length of ‘dimnames’ [2] not equal to array extent” on one of two very similar sets
- Mean per group in a data.frame
- How to install RHadoop packages (Rmr, Rhdfs, Rhbase)?
- Error in dev.off() : cannot shut down device 1 (the null device)
- How to create an empty matrix in R?
- How to fix “Attempted relative import in non-package” even with __init__.py
- standard deviation on dataframe does not work
- Warning message: In `…` : invalid factor level, NA generated
- How to increase font size in a plot in R?
- What is the difference between –save and –save-dev?
- What is the difference between = and ==?
- Merge r brings error “‘by’ must specify uniquely valid columns”
- Subscripts in plots in R
- promise already under evaluation: recursive default argument reference or earlier problems?
- What does the error “arguments imply differing number of rows: x, y” mean?
- Aggregate multiple columns at once
- Error in model.frame.default: variable lengths differ
- Non-numeric argument to mathematical function
- Position-dodge warning with ggplot boxplot?
- Plot two graphs in same plot in R
- Can’t import my own modules in Python
- data.table vs dplyr: can one do something well the other can’t or does poorly?
- R – Concatenate two dataframes?
- KNN in R: ‘train and class have different lengths’?
- Error in rep(1, n.ahead) : invalid ‘times’ argument in R
- What does “The following object is masked from ‘package:xxx'” mean?
- Producing subscripts in R markdown
- ggplot geom_text font size control
- lme4::lmer reports “fixed-effect model matrix is rank deficient”, do I need a fix and how to?
- R multiple conditions in if statement
- How do you use “<<-" (scoping assignment) in R?
- Remove quotes from a character vector in R
- Convert data.frame columns from factors to characters
- Re-ordering factor levels in data frame
- Is it possible to have a multi-line comments in R?
- Understanding the result of modulo operator: %%
- R – error “variable lengths differ”
- Simple manual RMarkdown tables that look good in HTML, PDF and DOCX
- Select rows from a data frame based on values in a vector
- how to increase the limit for max.print in R
- dplyr: “Error in n(): function should not be called directly”
- how to increase the limit for max.print in R
- In R formulas, why do I have to use the I() function on power terms, like y ~ I(x^3)
- What’s the difference between a Python module and a Python package?
- backward elimination in R
- Error in eval(expr, envir, enclos) : object not found
- Filter data.frame rows by a logical condition
- Replace NA with 0 in a data frame column [duplicate]