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?
- What is __init__.py for?
- beyond top level package error in relative import
- ModuleNotFoundError: No module named ‘sklearn’
- beyond top level package error in relative import
- What is a Python egg?
- Plot multiple lines in one graph
- Create empty data frame with column names by assigning a string vector?
- Changing font size and direction of axes text in ggplot2
- Warning message: line appears to contain embedded nulls [duplicate]
- How to change line width in ggplot?
- Error in library(ggplot2) : There is no package called ‘ggplot2’
- How to drop columns by name in a data frame
- How to reshape data from long to wide format
- Change size of axes title and labels in ggplot2
- Multiple If Statements in R
- 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
- R “Error: unexpected ‘}’ in “}”
- How to create an empty matrix in R?
- How to fix “Attempted relative import in non-package” even with __init__.py
- How to increase font size in a plot in R?
- What is the difference between –save and –save-dev?
- Subscripts in plots in R
- Non-numeric argument to mathematical function
- Position-dodge warning with ggplot boxplot?
- data.table vs dplyr: can one do something well the other can’t or does poorly?
- R – Concatenate two dataframes?
- 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?
- 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”
- 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
- How do I convert a factor into date format?
- Write lines of text to a file in R
- How to compute summation in r
- Plot multiple boxplot in one graph
- R will plot but won’t draw abline
- scale_fill_discrete and scale_fill_manual – legend options confusion
- R – argument is of length zero in if statement
- ‘Incomplete final line’ warning when trying to read a .csv file into R
- How to solve ‘protection stack overflow’ issue in R Studio
- Merging data – Error in fix.by(by.x, x)
- Error in 2:n : NA/NaN argument
- Error in generating boxplot two variable data frame: adding class “factor” to an invalid object
- Error : Unable to start png() device
- How do I flip rows and columns in R
- Remove NA values from a vector
- How to catch integer(0)?
- “no function to return from, jumping to top level”
- r random forest error – type of predictors in new data do not match
- env=baseenv() in R
- How to set axis range R
- Sample random rows in dataframe
- What does Continuous x aesthetic — did you forget aes(group=…) mean?
- How to make rpm auto install dependencies
- What does the error “object not interpretable as a factor” mean?
- use first row data as column names in r
- Gradient of n colors ranging from color 1 and color 2
- Replace all 0 values to NA
- R Sweave: NO TeX installation detected
- Plotting legend outside plot in R
- Boolean operators && and ||
- R avoiding “restarting interrupted promise evaluation” warning
- ERROR: [on_request_read] connection reset by peer in R shiny
- Error in as.vector(x, mode) : cannot coerce type ‘closure’ to vector of type ‘any’
- Suppress output of a function
- Get dplyr count of distinct in a readable way
- “Python version 2.7 required, which was not found in the registry” error when attempting to install netCDF4 on Windows 8
- What does is.na() applied to non-(list or vector) of type ‘NULL’ mean?
- error r: invalid subscript type “closure” in a simple regression
- r function unzip error 1 in extracting from zip file
- Colour points in a plot differently depending on a vector of values
- increase legend font size ggplot2
- How To Create Vector of Vector In R
- Round down a numeric
- Transposing in dplyr
- Does the c command create a row vector or a column vector by default in R
- Can dplyr join on multiple columns or composite key?
- Convert data.frame column to a vector?
- Error in summary.connection(connection) : invalid connection
- Converting from a character to a numeric data frame