newSparkBar(sparkTable)
newSparkBar()所属R语言包:sparkTable
Functions to create new Spark object
函数来创建新的Spark对象
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Basic functions to create objects of the class 'spark'. The functions are the base for creating a graphical table.
基本功能来创建对象类的“星星之火”。的功能是创建一个图形表的基础。
用法----------Usage----------
newSparkLine(width=NULL, height=NULL, values=NULL, padding=NULL, allColors=NULL,
pointWidth=NULL, lineWidth=NULL, showIQR=NULL, vMin=NULL, vMax=NULL,outputType="html")
newSparkBar(width=NULL, height=NULL, values=NULL, padding=NULL, barCol=NULL,
barWidth=NULL, barSpacingPerc=NULL, vMin=NULL, vMax=NULL,outputType="html")
newSparkBox(width=NULL, height=NULL, values=NULL, padding=NULL, boxOutCol=NULL,
boxMedCol=NULL, boxShowOut=NULL, boxCol=NULL, boxLineWidth=NULL,
vMin=NULL, vMax=NULL,outputType="html")
newSparkHist(width=NULL, height=NULL, values=NULL, padding=NULL, barCol=NULL,
barWidth=NULL, barSpacingPerc=NULL, vMin=NULL, vMax=NULL,outputType="html")
参数----------Arguments----------
参数:width
described in setParameter
setParameter
参数:height
described in setParameter
setParameter
参数:values
described in setParameter
setParameter
参数:padding
described in setParameter
setParameter
参数:allColors
described in setParameter
setParameter
参数:pointWidth
described in setParameter
setParameter
参数:lineWidth
described in setParameter
setParameter
参数:showIQR
described in setParameter
setParameter
参数:vMin
numeric vector of length 1 definining minimum value required for data scaling
数值向量的长度为1的划数据缩放所需的最小值
参数:vMax
numeric vector of length 1 definining maximum value required for data scaling
数字矢量的长度为1的划最大值所需的数据换算
参数:barCol
described in setParameter
setParameter
参数:barWidth
described in setParameter
setParameter
参数:barSpacingPerc
described in setParameter
setParameter
参数:boxOutCol
character vector of length 1 defining the color of outliers in spark boxplots
字符长度为1的向量定义颜色离群火花的盒状图
参数:boxMedCol
character vector of length 1 defining the color of median line in spark boxplots
字符向量长度为1的定义的颜色中线的火花的盒状图
参数:boxShowOut
logical vector specifying if outliers should be displayed in spark boxplots
逻辑向量确定,如果异常值应显示在火花的盒状图
参数:boxCol
described in setParameter
setParameter
参数:boxLineWidth
described in setParameter
setParameter
参数:outputType
described in plotSparks
plotSparks
(作者)----------Author(s)----------
Bernhard Meindl, Alexander Kowarik, Statistics Austria
参见----------See Also----------
plotSparkTable, plotSparks, setParameter, getParameter
plotSparkTable,plotSparks,setParameter,getParameter
实例----------Examples----------
data(pop)
x <- pop[pop[,2]=="Insgesamt",3]
### SparkLine[##走势图]
a <- newSparkLine(values=x, pointWidth=8)
plotSparks(a, outputType='png', filename='testLine1')
a <- setParameter(a, sample(1:10, 15, replace=TRUE), type='values')
getParameter(a, type='values')
a <- setParameter(a, c("darkred", "darkgreen","darkblue", "white", "black", "red"), type='allColors')
getParameter(a, type='allColors')
a <- setParameter(a, 3, type='pointWidth')
a <- setParameter(a, 1, type='lineWidth')
plotSparks(a, outputType="pdf", filename='testLine2')
a <- setParameter(a, 6, type='width')
a <- setParameter(a, .6, type='height')
plotSparks(a, outputType='eps', filename='testLine2')
### SparkBar[##SparkBar]
b <- newSparkBar(values=x-min(x))
getParameter(b, type='values')
b <- setParameter(b, c("darkred", "darkgreen","black"), type='barCol')
plotSparks(b, outputType='pdf', filename='testBar1')
b <- setParameter(b, 0:10, type='values')
plotSparks(b, outputType='pdf', filename='testBar2')
b <- setParameter(b, 0:-10, type='values')
plotSparks(b, outputType='pdf', filename='testBar3')
### SparkBox[##SparkBox]
cc <- newSparkBox(values=x)
cc <- setParameter(cc, "darkgreen", type='outCol')
getParameter(cc, type='outCol')
cc <- setParameter(cc, c("black","red"), type='boxCol')
plotSparks(cc, outputType='pdf', filename='testBox1')
cc <- setParameter(cc, c("black","darkgreen"), type='boxCol')
cc <- setParameter(cc, "darkred", type='outCol')
plotSparks(cc, outputType='pdf', filename='testBox2')
###SparkHist[##SparkHist]
hh <- newSparkHist(values=rnorm(100))
plotSparks(hh, outputType='pdf', filename='testHist1')
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|