newGeoTable(sparkTable)
newGeoTable()所属R语言包:sparkTable
Functions to create a new object of class 'geoTable'
函数来创建一个新的对象类的geoTable
译者:生物统计家园网 机器人LoveR
描述----------Description----------
User-function to create objects of the class 'geoTable'.
用户函数来创建对象类的geoTable。
用法----------Usage----------
newGeoTable(dataObj, tableContent, varType, geographicVar, geographicInfo=NULL)
参数----------Arguments----------
参数:dataObj
a data frame containing information to be plotted.
要绘制的数据框包含信息。
参数:tableContent
a list with elements of class 'sparkline','sparkbox','sparkbar' or 'function'
列表中的元素类“迷你图”,“sparkbox”,“sparkbar”或“功能”
参数:varType
a character vector containing variable names existing in dataObj.
一个字符向量存在的变量名,在dataObj。
参数:geographicVar
a character variable of length 1 with a variable name of dataObj that holds regional information.
字符变量中的一个变量名的长度为1 dataObj举行区域信息。
参数:geographicInfo
if specified, a data.frame containing 3 columns.
如果指定了一个数据框包含3列。
first column: row-indices
第一列:行指数
second column: column-indices
第二列:列指数
third column: regional codes
第三列:区域码
(作者)----------Author(s)----------
Bernhard Meindl, Alexander Kowarik, Statistics Austria
参见----------See Also----------
plotGeoTable
plotGeoTable
实例----------Examples----------
###Example EU population and debt[##例如欧盟人口和债务]
data(popEU,package="sparkTable")
data(debtEU,package="sparkTable")
data(coordsEU,package="sparkTable")
popEU <- popEU[popEU$country%in%coordsEU$country,]
debtEU <- debtEU[debtEU$country%in%coordsEU$country,]
EU <- cbind(popEU,debtEU[,-1])
EUlong <- reshapeExt(EU,idvar="country",v.names=c("pop","debt"), varying=list(2:13,14:25),geographicVar="country",timeValues=1999:2010)
l <- newSparkLine()
l <- setParameter(l, 'lineWidth', 2.5)
content <- list(function(x){"Population:"},l,function(x){"Debt:"},l)
varType <- c(rep("pop",2),rep("debt",2))
xGeoEU <- newGeoTable(EUlong, content, varType,geographicVar="country",geographicInfo=coordsEU)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|