\name{dsBuildRMatrix} \alias{dsBuildRMatrix} \title{Builds a matrix summarizing parameters for a database} \description{ This applies \code{sumFun} to each link model parameter set in a ASP database and returns a big data frame giving the result of the function for each object. The summary function, \code{sumFun}, should return a vector of the same length for each object. } \usage{ dsBuildRMatrix(FUN, ..., chains, window, linkModelList = listLinkModels(), trimRegExp = NULL, maxparams = 99, silent = TRUE) } \arguments{ \item{FUN}{A summary function for a parameter set. This function should return a labeled vector of statistics for the parameter set. It could also return \code{NA} if the parameter set was \code{NA} (due to thining).} \item{\dots}{Additional arguments passed to \code{FUN}.} \item{chains}{A vector of chains to extract data for. By default it uses all chains which have positive length.} \item{window}{A vector containing the first and last cycle to use. Last cycle defaults to length of smallest chain in database. Burn-in defaults to 1001 for long series, 501 for short series and 1 for very short series.} \item{linkModelList}{List of link models to use. (Defaults to all in database after filtering.)} \item{trimRegExp}{A regular expression for names of link or student models which will be trimmed from the list of models to be read.} \item{maxparams}{A interger given the maximum number of parameter to be read in a parameter set. This saves reading really big parameter into memory and may avoid memory problems on some PCs. } \item{silent}{Boolean flag, if true print messages about progress.} } \details{ Connects to the current database (the last one defined using \code{asp.dbConnect}) and extracts a summary from each parameter set and model, putting it into a row of a data frame. The summary function \code{FUN} is assumed to return a numeric vector of a fixed length, which is bound into a data frame. } \value{ A \code{data.frame} giving the results for each parameter set. The first three columns provide the name of the task, the name of the evidence model and the name of the observable respectively. } \note{ This function does much the same work as \code{daCapo} followed by \code{buildRMatrix}. However, it does not produce the large \code{daCapo} object. Thus it is more efficient with memory, but less efficient with time. } \author{Russell Almond} \seealso{\code{\link{buildRMatrix}},\code{\link{meanVar}}, \code{\link{mvr}}, \code{\link{daCapo}}} \examples{\dontrun{ ## Setting maxparams=15 screeens out hyperDirichlet distributions. meanVarTable <- dsBuildRMatrix(mvr, c("Difficulty","logDisc","DiffInc"), maxparams=15) } } \keyword{database}% at least one, from doc/KEYWORDS