\name{xmlStatisticMeta} \alias{xmlStatisticMeta} \title{Generates XML for a StatisticMeta object} \description{ This takes a \code{StatisticMeta} object, a description of the columns in a CSV file corresponding, and creates a corresponding \code{XMLNode} object suitable for inclusion in a Pretest Description (\code{pd.xml}) file. } \usage{ xmlStatisticMeta(stat, nextCol= quote(nextPDColumn())) } \arguments{ \item{stat}{A \code{\link{StatisticMeta}} object giving the description of the statistic.} \item{nextCol}{A expresssion which when evaluated will give the next column number in sequence.} } \value{ An \code{\link[XML]{XMLNode}} object giving the information contained in the the originial argument. Note that the number and type of attributes and child elements will depend on \code{stat$type}. } \note{ The default version of this function uses the \code{\link{nextPDColumn}()} function to generate column numbers, so it assumes that \code{\link{resetPDColumns}()} has already been called. } \references{ \url{http://research.ets.org/~ralmond/StatShop/dataFormats.html} } \author{Russell Almond} \seealso{\code{\link{xmlPretestDescription}}, \code{\link{StatisticMeta}}, \code{\link[XML]{XMLNode}}, \code{\link{nextPDColumn}} } \examples{ realstat <- StatisticMeta("mean(Skill1)","Real",columnID="Mean.Skill1") discstat <- StatisticMeta("mode(Skill1)","Discrete",columnID="Mode.Skill1", translationTable = integerCodes(c("High","Medium","Low"),NULL)) probstat <- StatisticMeta("margin(Skill1)","Probability", columnID="p.Skill1.", levels = c("High","Medium","Low")) resetPDColumns() xmlStatisticMeta(realstat) xmlStatisticMeta(discstat) xmlStatisticMeta(probstat) } \keyword{interface}