找回密码
 注册
查看: 339|回复: 0

R语言 sparkTable包 plotSparkTable-methods()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 12:26:53 | 显示全部楼层 |阅读模式
plotSparkTable-methods(sparkTable)
plotSparkTable-methods()所属R语言包:sparkTable

                                        Plot objects of class 'sparkTable'
                                         图对象类的sparkTable“

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Function that plots objects of class 'sparkTable'.
功能绘制对象的类的sparkTable“的。


用法----------Usage----------


        plotSparkTable(object, outputType='html', filename=NULL, graphNames='out', ...)



参数----------Arguments----------

参数:object
an object of class 'sparkTable'
对象类的sparkTable“


参数:outputType
a character vector of length one specifying the desired output format:   
字符向量的长度指定所需的输出格式:

'tex': latex output is produced  
“TEX”:乳胶输出

'html': html output is procuded  </ul>          
“HTML”:,HTML输出procuded </ ul>


参数:filename
the filename of the output (minus '.tex' or '.html'
输出的文件名(减的tex或。的HTML“


参数:graphNames
the main part of the single graphic files that are produced (minus '-someIndex.extension'
单的图形产生的文件(减去的主要部分的 -  someIndex.extension


参数:...
additional parameters to be passed
额外的参数传递


(作者)----------Author(s)----------


Bernhard Meindl, Alexander Kowarik, Statistics Austria



参见----------See Also----------

summaryST
summaryST


实例----------Examples----------


        data(pop,package="sparkTable")
        b <- newSparkBox()
        l <- newSparkLine()
        bb <- newSparkBar()
        content <- list(function(x) { round(mean(x),2) },
                b,
                l,
                bb,
                function(x) { round(tail(x,1),2) })
        names(content) <- paste("column",1:length(content),sep="")
        varType <- rep("value",length(content))
        pop <- pop[,c("variable","value","time")]
        pop$time <- as.numeric(as.character(pop$time))
        xx <- reshapeExt(pop,idvar="variable", varying=list(2))
        x1 <- newSparkTable(xx, content, varType)
        plotSparkTable(x1, outputType="html", graphNames="o2",filename="t1")
        plotSparkTable(x1, outputType="tex", graphNames="o3",filename="t2")
        #Example Hist+Box with 2 variables in 10 different groups[例如历史+盒2个变量在10个不同的组]
        datEx <- data.frame(variable=sample(paste("Cat",1:10,sep="_"),1000,replace=TRUE),value=rnorm(1000),value2=rlnorm(1000))
        b <- newSparkBox()
        h <- newSparkHist()
  content <- list(function(x) { round(mean(x),2) },
                function(x) { round(median(x),2) },
                function(x) { round(quantile(x,.25),2) },
                function(x) { round(quantile(x,.75),2) },
                b,
          h,
          function(x) { round(mean(x),2) },
    function(x) { round(median(x),2) },
                function(x) { round(quantile(x,.25),2) },
                function(x) { round(quantile(x,.75),2) },
                b,
          h
        )
        names(content) <- c(paste(c("Mean","Median","Q25","Q75","Boxplot","Histogram"),"_v1",sep=""),
        paste(c("Mean","Median","Q25","Q75","Boxplot","Histogram"),"_v2",sep="")
        )
        varType <- c(rep("value",length(content)/2),rep("value2",length(content)/2))
        datEx <- reshapeExt(datEx,idvar="variable", varying=list(2,3))
        x2 <- newSparkTable(datEx, content, varType)
        plotSparkTable(x2, outputType="html", graphNames="o2",filename="t1")
       

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-6-10 00:45 , Processed in 0.023552 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表