[R] How do I really, I mean really, unload a package?

Kevin Wright kw.stat at gmail.com
Wed Sep 24 20:56:30 CEST 2014


Sorry if this is well-known, but I can't find an answer or maybe just don't
know how to ask Google the right question.  If I run the following code in
R (3.1.1), I find that lattice:::xyplot.formula is still available (or
maybe just a promise to it ... ???) even though I've used detach and
unloadNamespace.  Is there another step I'm missing?

require(lattice)
head(lattice:::xyplot.formula)
detach(package:lattice)
search() # No longer on search list
loadedNamespaces() # But namespace is still loaded
unloadNamespace("lattice")
loadedNamespaces() # Namespace not loaded
head(lattice:::xyplot.formula)  # It is still accessible

Kevin

	[[alternative HTML version deleted]]



More information about the R-help mailing list