[R] Problem on running update

Stephen Liu satimis at yahoo.com
Mon Nov 22 02:21:20 CET 2010


Hi Martin,

Thanks for your advice.  

This is my first time hunting for cause of error on R.

Steps performed as follows;

> Sys.glob(file.path(.libPaths()[1], "*", "DESCRIPTION"))
 [1] "C:\\Users\\satimis\\Documents/R/win-library/2.12/Ecdat/DESCRIPTION"       
 [2] "C:\\Users\\satimis\\Documents/R/win-library/2.12/RColorBrewer/DESCRIPTION"
 [3] "C:\\Users\\satimis\\Documents/R/win-library/2.12/Rglpk/DESCRIPTION"       
 [4] "C:\\Users\\satimis\\Documents/R/win-library/2.12/akima/DESCRIPTION"       
 [5] "C:\\Users\\satimis\\Documents/R/win-library/2.12/bitops/DESCRIPTION"      
 [6] "C:\\Users\\satimis\\Documents/R/win-library/2.12/caTools/DESCRIPTION"     
 [7] "C:\\Users\\satimis\\Documents/R/win-library/2.12/cubature/DESCRIPTION"    
 [8] "C:\\Users\\satimis\\Documents/R/win-library/2.12/degreenet/DESCRIPTION"   
 [9] "C:\\Users\\satimis\\Documents/R/win-library/2.12/ergm/DESCRIPTION"        
[10] "C:\\Users\\satimis\\Documents/R/win-library/2.12/fBasics/DESCRIPTION"     
[11] "C:\\Users\\satimis\\Documents/R/win-library/2.12/gam/DESCRIPTION"         
[12] "C:\\Users\\satimis\\Documents/R/win-library/2.12/gdata/DESCRIPTION"       
[13] "C:\\Users\\satimis\\Documents/R/win-library/2.12/gplots/DESCRIPTION"      
[14] "C:\\Users\\satimis\\Documents/R/win-library/2.12/gtools/DESCRIPTION"      
[15] "C:\\Users\\satimis\\Documents/R/win-library/2.12/kinship/DESCRIPTION"     
[16] "C:\\Users\\satimis\\Documents/R/win-library/2.12/latentnet/DESCRIPTION"   
[17] "C:\\Users\\satimis\\Documents/R/win-library/2.12/logspline/DESCRIPTION"   
[18] "C:\\Users\\satimis\\Documents/R/win-library/2.12/maxLik/DESCRIPTION"      
[19] "C:\\Users\\satimis\\Documents/R/win-library/2.12/miscTools/DESCRIPTION"   
[20] "C:\\Users\\satimis\\Documents/R/win-library/2.12/network/DESCRIPTION"     
[21] "C:\\Users\\satimis\\Documents/R/win-library/2.12/numDeriv/DESCRIPTION"    
[22] "C:\\Users\\satimis\\Documents/R/win-library/2.12/nws/DESCRIPTION"         
[23] "C:\\Users\\satimis\\Documents/R/win-library/2.12/rgdal/DESCRIPTION"       
[24] "C:\\Users\\satimis\\Documents/R/win-library/2.12/rgenoud/DESCRIPTION"     
[25] "C:\\Users\\satimis\\Documents/R/win-library/2.12/rlecuyer/DESCRIPTION"    
[26] "C:\\Users\\satimis\\Documents/R/win-library/2.12/rsprng/DESCRIPTION"      
[27] "C:\\Users\\satimis\\Documents/R/win-library/2.12/sem/DESCRIPTION"         
[28] "C:\\Users\\satimis\\Documents/R/win-library/2.12/shapes/DESCRIPTION"      
[29] "C:\\Users\\satimis\\Documents/R/win-library/2.12/slam/DESCRIPTION"        
[30] "C:\\Users\\satimis\\Documents/R/win-library/2.12/snow/DESCRIPTION"        
[31] "C:\\Users\\satimis\\Documents/R/win-library/2.12/snowFT/DESCRIPTION"      
[32] "C:\\Users\\satimis\\Documents/R/win-library/2.12/statmod/DESCRIPTION"     
[33] "C:\\Users\\satimis\\Documents/R/win-library/2.12/statnet/DESCRIPTION"     
[34] "C:\\Users\\satimis\\Documents/R/win-library/2.12/tripack/DESCRIPTION"     
[35] "C:\\Users\\satimis\\Documents/R/win-library/2.12/trust/DESCRIPTION"       
[36] "C:\\Users\\satimis\\Documents/R/win-library/2.12/tweedie/DESCRIPTION"     
> 

> traceback()
5: .readPkgDesc(lib, fields)
4: installed.packages(lib.loc = lib.loc)
3: NROW(instPkgs)
2: old.packages(lib.loc = lib.loc, contriburl = contriburl, method = method, 
       available = available, checkBuilt = checkBuilt)
1: update.packages(repos = "http://cran.r-project.org")

Enter a frame number, or 0 to exit   


> options(error=recover)
>  update.packages(repos="http://cran.r-project.org")

1: update.packages(repos = "http://cran.r-project.org")
2: old.packages(lib.loc = lib.loc, contriburl = contriburl, method = method, a
3: NROW(instPkgs)
4: installed.packages(lib.loc = lib.loc)
5: .readPkgDesc(lib, fields)

Selection: 1
Called from: old.packages(lib.loc = lib.loc, contriburl = contriburl, method = 
method, 

    available = available, checkBuilt = checkBuilt)
Browse[1]> ?browser
starting httpd help server ... done

Browser[1] ?recover

Looked at them and wondered what to do next?


B.R.
Stephen L



----- Original Message ----
From: Martin Morgan <mtmorgan at fhcrc.org>
To: Stephen Liu <satimis at yahoo.com>
Cc: r-help at r-project.org
Sent: Mon, November 22, 2010 1:30:29 AM
Subject: Re: [R] Problem on running update

On 11/21/2010 03:12 AM, Stephen Liu wrote:
> Hi Martin,
> 
> Thanks for your advice.
> 
> Ran following code on R-2.12.0 32bit as admin
> 
>> for(lib in .libPaths()) {
> + descs <- Sys.glob(file.path(lib, "*", "DESCRIPTION"))
> + sizes <- file.info(descs)$size
> + names(sizes) <- descs
> + print(sizes[sizes < 100])
> + }
> named numeric(0)
> named numeric(0)
> 
> Where are the above files?

If your  problem was as a regular user, then run the above code as
regular user not admin.

Not sure what 'the above files' are that you are looking for; the 'named
numeric(0)' says that no packages have DESCRIPTION files with size <
100; the loop looked in all directories in

  .libPaths()

for a subdirectory with file DESCRIPTION; you can find these by for instance

  Sys.glob(file.path(.libPaths()[1], "*", "DESCRIPTION"))

Your next step is to identify where the error is occurring; you might try

  update.packages(repos="http://cran.r-project.org")

and when the error occurs use

  traceback()

to understand the functions that are being called at the time of the
error; the output of traceback() will be helpful to the list, even if
not useful to you. The next step is likely to try to identify more
precisely where the problem is, e.g.,

   options(error=recover)
   update.packages(repos="http://cran.r-project.org")

and then following the instructions on ?recover and ?browser to more
precisely identify the problem. Use options(error=NULL) to turn off
recovery when done.

Martin

> 
> 
> B.R.
> Stephen L
> 
> 
> 
> 
> ----- Original Message ----
> From: Martin Morgan <mtmorgan at fhcrc.org>
> To: Stephen Liu <satimis at yahoo.com>
> Cc: r-help at r-project.org
> Sent: Sun, November 21, 2010 2:10:52 PM
> Subject: Re: [R] Problem on running update
> 
> On 11/20/2010 08:56 PM, Stephen Liu wrote:
>> Hi folks,
>>
>> Win 7 64bit
>> R 2.12.)
>>
>> Today on running:
>>
>>> update.packages()
>> Error: subscript out of bounds
>>
>> Unable to proceed.  I have been googling around and couldn't discover the 
>> cause.  Pls help.  TIA
> 
> Hi Stephen -- maybe
> 
> https://stat.ethz.ch/pipermail/r-help/2010-November/259912.html
> 
> Martin
> 
>>
>>
>> B.R.
>> Stephen L
>>
>>
>>
>> ______________________________________________
>> R-help at r-project.org 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.
> 
> 


-- 
Computational Biology
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109

Location: M1-B861
Telephone: 206 667-2793






More information about the R-help mailing list