[R] Help w/ custom pkg: ERROR: installing package indices failed

Seth Falcon sfalcon at fhcrc.org
Fri Sep 17 23:14:05 CEST 2004


I'm using R 1.9.1 on Linux and am having trouble installing a package 
that I've written.  Would very much appreciate a hint as to where to 
look to find my mistake.

I can build the package, but when I try to install it, I get an error like:

Error in FUN(X[[as.integer(1)]], ...) : subscript out of bounds
Execution halted
ERROR: installing package indices failed

After some trial and error, I find that there is one troublesome Rd 
file.  If I remove it, I can build and install the package.  But I can't 
figure out what's wrong with the Rd file!  E.g., in ESS it previews just 
fine and appears to get built in the transcript below.

Below is a transcript of building and installing...

Building:

$ ls capsim
DESCRIPTION  R  man

$ R CMD build capsim
* checking for file 'capsim/DESCRIPTION' ... OK
* preparing 'capsim':
* removing junk files
* building 'capsim_1.0.tar.gz'

Installing:

$ R CMD INSTALL capsim_1.0.tar.gz
* Installing *source* package 'capsim' ...
** R
** help
  >>> Building/Updating help pages for package 'capsim'
      Formats: text html latex example
   collect                           text    html    latex
   collectRunData                    text    html    latex
   combineAges                       text    html    latex
   combineAges.single                text    html    latex
   combineAges3                      text    html    latex
   combineIncidenceData              text    html    latex
   combineMortalityData              text    html    latex
   getAgeAdjustmentCounts            text    html    latex
   getAllStageIncidence              text    html    latex
   getMortByStage                    text    html    latex
   getRunResults                     text    html    latex
   getSeerStageInflateMatrix         text    html    latex
   inflateSeerData                   text    html    latex
   loadIncidenceData                 text    html    latex
   loadMortalityData                 text    html    latex
   loadRRSurvData                    text    html    latex
   loadSeerData                      text    html    latex
Error in FUN(X[[as.integer(1)]], ...) : subscript out of bounds
Execution halted
ERROR: installing package indices failed
** Removing '/home/sfalcon/util/lib/R/capsim'

Here's the troublesome Rd file:

\name{combineAges3}
\title{Age adjust data and combine SEER, SEERInflated and model data 
frames.}
\description{
Use \code{getAgeAdjustmentCounts} to get standard population counts and
combine age categories using appropriate weights.
}
\usage{
combineAges3(seer, seerInflated, model, col.names)
}
\arguments{
   \item{seer}{A data frame containing SEER data.  Must contain columns 
``year'' and ``age''.}
   \item{seerInflated}{A data frame containing inflated SEER data.  Must 
contain columns ``year'' and ``age''.}
   \item{model}{A data frame containing model data.  Must contain 
columns ``year'' and ``age''. }
   \item{col.names}{ Column name of the column in both data frames that 
should be adjusted.
       For example, ``incidence'' or ``mortality''.  }
}
\details{
Hmm, not yet.
}
\value{
A data frame with columns: year, age, and source, \code{col.names}.  The
source column is a factor with levels ``model'', ``seer'', and
``seerInflated'' indicating the source of the data.
}
\references{No ref}
\author{Seth Falcon}
\note{No Notes}

\keyword{manip}




More information about the R-help mailing list