You likely want the answer that Sarah has already given but in
addition you might also want to look at the thread below,
the point being that detaching a package still leaves portions:

https://www.stat.math.ethz.ch/pipermail/r-help/2006-July/109056.html


On 8/25/06, Sarah Goslee <[EMAIL PROTECTED]> wrote:
> Hi,
>
> There are two ways that I know of:
> detach("package:zoo")
> or use detach() with the number of that package's
> place in the search list.
>
> > library(zoo)
> > search()
>  [1] ".GlobalEnv"        "package:zoo"       "package:methods"
>  [4] "package:graphics"  "package:grDevices" "package:utils"
>  [7] "package:datasets"  "package:ecoutils"  "package:ecodist"
> [10] "package:stats"     "package:gtkDevice" "Autoloads"
> [13] "package:base"
> > detach("package:zoo")
> > search()
>  [1] ".GlobalEnv"        "package:methods"   "package:graphics"
>  [4] "package:grDevices" "package:utils"     "package:datasets"
>  [7] "package:ecoutils"  "package:ecodist"   "package:stats"
> [10] "package:gtkDevice" "Autoloads"         "package:base"
>
> OR
>
> > library(zoo)
> > search()
>  [1] ".GlobalEnv"        "package:zoo"       "package:methods"
>  [4] "package:graphics"  "package:grDevices" "package:utils"
>  [7] "package:datasets"  "package:ecoutils"  "package:ecodist"
> [10] "package:stats"     "package:gtkDevice" "Autoloads"
> [13] "package:base"
> > detach(2)
> > search()
>  [1] ".GlobalEnv"        "package:methods"   "package:graphics"
>  [4] "package:grDevices" "package:utils"     "package:datasets"
>  [7] "package:ecoutils"  "package:ecodist"   "package:stats"
> [10] "package:gtkDevice" "Autoloads"         "package:base"
>
> Sarah

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to