David Parkhurst wrote: > > After entering library(rpart), I tried to plot an existing rpart tree, and > got this error message: Error: couldn't find function "plot.rpart". > However, ?plot.rpart does bring up the help for the function. The same > things occur for text.rpart, although print(my.tree) does work. > > So, I tried to re-install rpart using Packages | Install from CRAN, but > then I get this message:- > > > local({a <- CRAN.packages() > > + install.packages(select.list(a[,1],,TRUE), .libPaths()[1], available=a)}) > > trying URL `http://cran.r-project.org/bin/windows/contrib/1.7/PACKAGES' > > Content type `text/plain; charset=iso-8859-1' length 12560 bytes > > opened URL > > downloaded 12Kb > > trying URL > `http://cran.r-project.org/bin/windows/contrib/1.7/rpart_3.1-12.zip' > > Content type `application/zip' length 231827 bytes > > opened URL > > downloaded 226Kb > > Error in unpackPkg(foundpkgs[okp, 2], pkgnames[okp], lib, installWithVers) : > > Can not remove prior installation of package > > > > Evidently I need to uninstall first, but I cant figure out how. Ive > looked in the pdf manuals, in the R FAQ, and in the R for Windows FAQ, and > dont find instructions for doing so. Id appreciate any help. Thanks. > > Dave Parkhurst
Since Ko-Kang Kevin Wang already told that the usage of the generic plot() instead of its method plot.rpart() (same for text() and text.rpart(); interestingly you haven't tried print.rpart() instead of print()) is the solution of your first questions (for details see the article on Namespaces in the recent R News), let's take a look at the second: Windows locks DLLs that are in use, so I guess the package rpart was in use while you tried to reinstall. See the R for Windows FAQ 3.8 for details. You can uninstall packages manually as well: Just delete the packages directory (as the default, it's .../rw1071/library/PackageName). Uwe Ligges ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help