setParameter(sparkTable)
setParameter()所属R语言包:sparkTable
Functions to interact with a Sparkline object
互动功能的迷你对象
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Basic functions to set parameters for objects of class 'sparkline', 'sparkbar', 'sparkbox', 'sparkTable' or 'geoTable'.
基本功能设置参数的对象的类的迷你图“,”sparkbar,sparkbox“,”sparkTable“或”geoTable的“。
用法----------Usage----------
setParameter(object, value, type)
参数----------Arguments----------
参数:object
objects of class 'sparkline', 'sparkbar', 'sparkbox', 'sparkTable' or 'geoTable'
对象的类“迷你图”,“sparkbar,sparkbox”,“sparkTable”或“geoTable的”
参数:type
one of the following:
以下操作之一:
'width': set/change slot 'width' for objects of class 'spark' and classes that directly extend this class.
'height': set/change slot 'height' for objects of class 'spark' and classes that directly extend this class.
“高度”:设置/改变槽的高度“类”星星之火“,并直接继承这个类的类的对象。
'values': set/change slot 'values' for objects of class 'spark' and classes that directly extend this class.
“价值”:设置/改变槽“价值”类“星星之火”,并直接继承这个类的类的对象。
'padding': set/change slot 'padding' for objects of class 'spark' and classes that directly extend this class.
“填充”设置/更改插槽的填充类“星星之火”,并直接继承这个类的类的对象。
'allColors': set/change slot 'allColors' for objects of class 'sparkline'.
“allColors”:设置/改变插槽的allColors,“类”迷你图“的对象。
'lineWidth': set/change slot 'lineWidth' for objects of class 'sparkline'.
“线宽”设置/更改插槽“线宽”类“迷你图”的对象。
'pointWidth': set/change slot 'pointWidth' for objects of class 'sparkline'.
“pointWidth”:设置/改变插槽的pointWidth“类”迷你图“的对象。
'showIQR': set/change slot 'showIQR' for objects of class 'sparkline'.
“showIQR”:设置/改变插槽的showIQR“类”迷你图“的对象。
'boxCol': set/change slot 'boxCol' for objects of class 'sparkbox'.
“boxCol”:设置/更改插槽boxCol“的对象类的sparkbox”。
'outCol': set/change slot 'outCol' for objects of class 'sparkbox'.
“outCol”:设置/更改插槽outCol“的对象类的sparkbox”。
'boxLineWidth': set/change slot 'boxLineWidth' for objects of class 'sparkbox'.
“boxLineWidth”:设置/改变插槽的boxLineWidth“的对象类的sparkbox”。
'barCol': set/change slot 'barCol' for objects of class 'sparkbar'.
“巴氏”:设置/改变槽“巴氏”的对象类的sparkbar“。
'barSpacingPerc': set/change slot 'barSpacingPerc' for objects of class 'sparkbar'.
“barSpacingPerc”:设置/更改插槽barSpacingPerc“的对象类的sparkbar”。
'dataObj': set/change slot 'dataObj' for objects of class 'sparkTable' or 'geoTable'.
“dataObj”:设置/改变插槽的dataObj“的对象类的sparkTable”,或者“geoTable”。
'tableContent': set/change slot 'tableContent' for objects of class 'sparkTable' or 'geoTable'.
“tableContent”:设置/改变插槽的tableContent“的对象类的sparkTable”,或者“geoTable”。
'varType': set/change slot 'varType' for objects of class 'sparkTable' or 'geoTable'.
VARTYPE:VARTYPE的对象类的sparkTable“或”geoTable的“设置/更改插槽。
'geographicVar': set/change slot 'geographicVar' for objects of class 'geoTable'.
geographicVar“:设置/改变插槽的geographicVar”的对象类的geoTable“。
'geographicInfo': set/change slot 'geographicInfo' for objects of class 'geoTable'.
geographicInfo“:设置/改变插槽的geographicInfo”的对象类的geoTable“。
'geographicOrder': set/change slot 'geographicOrder' for objects of class 'geoTable'.
“geographicOrder”:设置/更改插槽的geographicOrder“的对象的类”geoTable的。
参数:value
values that are used to updated the slot chosen with argument 'type':
,用于更新的插槽选择“类型”参数的值:
if type=='width': numeric vector of length 1 defining the width of the resulting plot
如果类型==宽:长度为1的数值向量定义的宽度将所得的图
if type=='height': numeric vector of length 1 defining the height of the resulting plot
如果类型==高度:长度为1的数值向量定义的高度所得的积
if type=='values': numeric vector defining the values to be plotted
如果type ==“价值”:数字矢量定义要绘制的值
if type=='padding': numeric vector of length 4 defining the padding of the plot in percent. The order is: top,bottom,left,right.
如果type ==填充:定义填充数字矢量的长度为4%的图。的顺序是:上,下,左,右。
if type=='allColors': a character vector of length 6 (including NA's) containing colors. The elements of the color vector are used as:
如果type ==allColors:字符长度为6的向量(包括NA),含有颜色。的颜色矢量的元素被用作:
first element: color for minimal value
最小的值的第一个元素:颜色
second element: color for maximal value
第二个元素:颜色最大值
third element: color for last value
第三个元素:颜色,最后一个值
fourth element: color for filling
第四元素:颜色填充
fifth element: color for the line
第五元素:颜色的线
sixth element: color for interquartil range
第六元素:颜色interquartil范围
if type=='lineWidth': numeric vector of length 1 defining the line width of the resulting sparkline
如果类型==线宽:数值向量长度为1的定义所得到的迷你图的线宽度
if type=='pointWidth': numeric vector of length 1 defining the width of points (min, max, last) of the resulting sparkline.
如果type ==pointWidth:数字矢量定义的宽度,长度为1点(最小值,最大值,最后产生的迷你图)。
if type=='showIQR': logical vector of length 1 defining if the IQR of the data should be plotted in the sparkline.
如果类型==showIQR:长度为1的逻辑向量定义的数据如果IQR应绘制在迷你图。
if type=='boxCol': character vector of length 2 defining colors to be used in a sparkbox plot.
如果type ==boxCol“:长度为2定义的字符向量使用的颜色在sparkbox图。
first element: color of the lines surrounding the boxes
第一个元素:颜色的线条周围的框
second element: fill color of the box
第二个元素:填充颜色的方块
if type=='outCol': character vector of length 1 defining the color of outliers in a sparkboxplot.
如果type == outCol:向量的长度为1的字符定义颜色的异常值在sparkboxplot。
if type=='boxLineWidth': numeric vector of length 1 defining the width of the surrounding lines of a sparkboxplot.
如果类型==boxLineWidth:定义周边一个sparkboxplot线的宽度的长度为1的数值向量。
if type=='barCol': character vector of length 3 defining colors to be used in a sparkbar plot.
如果==巴氏:字符长度为3的向量定义颜色要使用在一个sparkbar的图。
first element: color of bars showing negative values
第一个元素:颜色条显示负值
second element: color of bars showing positive values
第二个元素:颜色条显示正面的价值观
third element: color of lines in the plot
第三行中的图元素:颜色
if type=='barSpacingPerc': numeric vector of length 1 defining the spacing in percent used between the bars in the sparkbar plot
如果type ==barSpacingPerc:长度为1的数字向量定义的间距之间的条形中的sparkbar的图%的人使用
if type=='dataObj': a data frame containing information to be plotted.
如果type ==的dataObj:一个数据框包含的信息要绘制。
if type=='tableContent': a list with elements of class 'sparkline','sparkbox','sparkbar' or 'function'
如果type ==tableContent:列表元素的类的迷你图“,”sparkbox“,”sparkbar“或”功能“
if type=='varType': a character vector containing variable names existing in dataObj.
如果type ==VARTYPE:一个字符向量中存在的dataObj的变量名。
if type=='geographicVar': a character variable of length 1 with a variable name of dataObj that holds regional information.
如果type == geographicVar:字符变量中的一个变量名的长度为1的dataObj举行区域信息。
if type=='geographicInfo': a data.frame with information on coordinates of regions to be plotted.
如果type ==geographicInfo:数据框的区域要绘制的坐标信息。
if type=='geographicOrder': a data.frame containing 3 columns that is usually automatically created.
如果type ==geographicOrder:包含3列,通常会自动创建一个数据框。
first column: row-indices
第一列:行指数
second column: column-indices
第二列:列指数
third column: regional codes
第三列:区域码
(作者)----------Author(s)----------
Bernhard Meindl, Alexander Kowarik, Statistics Austria
参见----------See Also----------
getParameter
getParameter
实例----------Examples----------
data(pop)
x <- pop[pop[,2]=="Insgesamt",3]
a <- newSparkLine(values=x, pointWidth=8)
a <- setParameter(a, type='values', value=sample(1:10, 15, replace=TRUE))
getParameter(a, 'values')
a <- setParameter(a, type='allColors', value=c("darkred", "darkgreen","darkblue", "white", "black", "red"))
getParameter(a, 'allColors')
getParameter(a, 'pointWidth')
a <- setParameter(a, type='pointWidth', value=3)
getParameter(a, 'pointWidth')
a <- setParameter(a, type='lineWidth', value=1)
a <- setParameter(a, type='width', value=6)
a <- setParameter(a, type='height', value=.6)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|