[R] Change in behavior of update.views()?

Achim Zeileis Achim.Zeileis at uibk.ac.at
Fri Mar 16 12:54:04 CET 2012


On Fri, 16 Mar 2012, Michael Kubovy wrote:

> I haven't seen this cryptic warning before:
>> update.views('Robust')
> Warning message:
> In update.views("Robust") :
>  The following packages are not available: covRobust, distr, FRB, MASS, 
> mblm, multinomRob, mvoutlier, quantreg, RandVar, rgam, RobAStBase, 
> robfilter, RobLox, RobRex, robust, RobustAFT, robustbase, ROptEst, 
> ROptRegTS, rrcov, sandwich, wle
>> library(covRobust)
>>
>
> It is puzzling because ? as the second command shows ? the package 
> covRobust is installed.

Even though it is installed, update.views() tries to find out whether the 
installed version is the most current version.

Essentially, it does the following:
(1) Query names of packages in the task view.
(2) Query names/versions of all available.packages() in the repository.
(3) Query names/versions of all installed.packages() on the local machine.
(4) install.packages() that are either not yet installed or not current.

The error message above occurs in step (2). The available.packages() found 
with your setup include _none_ of the packages in the task view. Possibly 
this is due to the repos used or the getOption("pkgType") requested.

On my machine:

R> getOption("repos")
[1] "http://CRAN.R-project.org/"
R> getOption("pkgType")
[1] "source"

And then the following works:

Step (1)

R> pkgs <- ctv:::.get_pkgs_from_ctv_or_repos("Robust")
R> pkgs
$`http://CRAN.R-project.org/`
  [1] "covRobust"   "distr"       "FRB"         "MASS"        "mblm"
  [6] "multinomRob" "mvoutlier"   "quantreg"    "RandVar"     "rgam"
[11] "RobAStBase"  "robfilter"   "RobLox"      "RobRex"      "robust"
[16] "RobustAFT"   "robustbase"  "ROptEst"     "ROptRegTS"   "rrcov"
[21] "sandwich"    "wle"

Step (2)

R> apkgs <- available.packages(contriburl = contrib.url(names(pkgs)))
R> dim(apkgs)
[1] 3661   13

And for the error message ctv looks essentially at

R> pkgs[[1]][ !(pkgs[[1]] %in% apkgs[,1]) ]
character(0)

I suspect that with your settings the apkgs object does not include all 
CRAN packages yet. Setting a different repos and/or a different pkgType 
should solve the problem.

hth,
Z

> Here is my
>> sessionInfo()
> R version 2.14.2 (2012-02-29)
> Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
>
> locale:
> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
>
> attached base packages:
> [1] datasets  splines   utils     stats     graphics  grDevices methods   base
>
> other attached packages:
> [1] covRobust_1.0       ade4_1.4-17         BiocInstaller_1.2.1 ctv_0.7-4           sos_1.3-1           brew_1.0-6          Hmisc_3.9-2         survival_2.36-12
> [9] MASS_7.3-17
>
> loaded via a namespace (and not attached):
> [1] cluster_1.14.2 grid_2.14.2    lattice_0.20-0 tools_2.14.2
>
>
> ______________________________________________
> Professor Michael Kubovy
> University of Virginia
> Department of Psychology
> for mail add:						for FedEx or UPS add:
> P.O.Box 400400					Gilmer Hall, Room 102
> Charlottesville, VA 22904-4400	485 McCormick Road
> USA							Charlottesville, VA 22903
> 		room	phone
> Office:    B011	+1-434-982-4729
> Lab:        B019	+1-434-982-4751
> WWW:    http://www.people.virginia.edu/~mk9y/
>
>
> 	[[alternative HTML version deleted]]
>
>



More information about the R-help mailing list