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

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

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

                                        Checkerplot
                                         Checkerplot

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

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

checkerplot
checkerplot


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


  checkerplot(data, cols=5, rows=5, geom="line", errorbar=FALSE, title=NULL, title.size=20,
    label.size=11, xbreaks=NULL, xlabels=NULL, ybreaks=NULL, ylabels=NULL, ymin=NULL,
    ymax=NULL, img=NULL, aes_geom=NULL, formatter=NULL, margin_yaxis=0, margin_yaxis2=0,
    margin_xaxis=0, margin_xaxis2=0, opts=NULL, ...)



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

参数:data
data frame
数据框


参数:cols
number of columns in the grid
在网格中的列数


参数:rows
number of rows in the grid
在网格中的行数


参数:geom
defines the geom, the geometric object, of the plot ("line", "bar", "point" are possible at the moment)
定义的geom,几何对象的图(“行”,“条形”,“点”是可能的时刻)


参数:errorbar
TRUE/FALSE plot additional errorbars (testing only)
TRUE / FALSE的积额外的errorbars(只测试)


参数:title
title of the plot, displayed above the plot
上述图的图,显示的标题


参数:title.size
font size of the plot title
图标题的字体大小


参数:label.size
font size of the labels
字体大小的标签


参数:xbreaks
number of breaks for the x-axis, default it is calculated automatically
为x轴,默认的场所的数量,它是自动计算的


参数:xlabels
labels of the breaks (optional)
标签的截断(可选)


参数:ybreaks
number of breaks for the y-axis, default it is calculated automatically
为y轴,默认的场所的数量,它是自动计算的


参数:ylabels
labels of the breaks (optional)
标签的截断(可选)


参数:ymin
minimum value of y-axis displayed, if not provided it will be automatically calculated
显示的y-轴的最小值,如果未提供,它会自动计算


参数:ymax
maximum value of x-axis displayed, if not provided it will be automatically calculated
显示的x-轴的最大值,如果未提供,它会自动计算


参数:img
vector containing all names (must equal the label column in the dataframe data) of  pictures (pnm files) displayed beside the label
矢量包含的所有名称(必须等于标签列中的数据框数据)标签旁边显示的图片(PNM文件)


参数:aes_geom
ggplot2 object to define the aesthetics of the geom
ggplot2对象来定义的geom的美学


参数:formatter
allows to format the y-axis (scale_x_continuous(formatter = formatter))
允许格式化的y轴(scale_x_continuous(格式化=格式化器))


参数:margin_yaxis
allows to adjust the distance from the plot to the left border of the grid for all elements with an y-axis and its annotation, because the difference number formats on the y-axis might  lead to a little displaced plot area  
允许调整的距离从电网的y轴和注释的所有元素的左边框的图,因为在y轴的不同的数字格式可能会导致一点点流离失所绘图区


参数:margin_yaxis2
allows to adjust the distance from the plot to the left border of the grid for all elements with an y-axis but without annotation
允许调整电网与y轴的所有元素的左边框的图,但没有注释的距离


参数:margin_xaxis
allows to adjust the distance from the plot to the left border of the grid for all elements with an x-axis and annotation, because the difference number formats on the y-axis might  lead to a little displaced plot area
允许调整的距离从图中的左边框的网格的所有元素的x轴和注释,在y-轴的不同的数字格式,因为可能会导致一个小流离失所绘图区


参数:margin_xaxis2
allows to adjust the distance from the plot to the left border of the grid for all elements with an x-axis but without annotation
允许调整距离网格的所有元素的x轴的左边框的图,但没有注释


参数:opts
ggplot2 object to change settings in the ggplot2 plots
ggplot2对象,以更改设置在ggplot2图


参数:...
further arguments passed through
通过进一步的论据


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


Karin Fuerst, Alexander Kowarik, Matthias Templ



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

optimal_grid_allocation, plotGeoTable
optimal_grid_allocation,plotGeoTable


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


### Directory of the package with flags[##目录的包装与标志]
dirflags = paste(searchpaths()[grep("sparkTable", searchpaths())], "/etc/Flaggen/", sep="")
### EXAMPLE for EUROPE[##例如对于欧洲]
  data(EU_data)
  order_eu = optimal_grid_allocation(EU_data[,16:17],8,7)
  colnames(EU_data)[1] <- c("country")
  EU_data[,18] <- order_eu
  colnames(EU_data)[1] <- c("country")
  colnames(EU_data)[18] <- c("order")
  data_eu = data.frame(cbind(rep(1997,34)), EU_data$unempl_f_1997, EU_data$country, EU_data$order)
  colnames(data_eu) = c("x", "y", "names", "order")
  for(year in 1998:2008){
    XX <- data.frame(cbind(rep(year,34)), EU_data[,paste("unempl_f_",year,sep="")], EU_data$country, EU_data$order)
    colnames(XX) = c("x", "y", "names", "order")
    data_eu = rbind(data_eu,XX)
  }
dirflags_eu=paste(dirflags,"EU/",sep="")
## Not run: [#不运行:]
checkerplot(data_eu, cols=8, rows=7, geom="line", img=dirflags_eu,
            title = "Unemployment rate in Europe 1997 to 2008 (in %)", title.size=18,
            ylabels=c(5,10,15,20),
                        ybreaks=c(5,10,15,20), xbreaks=c(1998,2001,2004,2007), xlabels=c("98","01","04","07"),
                    margin_yaxis=-0.05, margin_yaxis2=-0.2,
                    margin_xaxis=-0.4, margin_xaxis2=0 )

## End(Not run)[#(不执行)]

### EXAMPLE for US data[##例如美国数据]
  data(coordUS)
  ## rearrange states which are far away:[#重排远的国家:]
  coordUS[coordUS$state %in% c("AK"),"x"] &lt;- 0.4  ## rearrange Alaska[#重新排列阿拉斯加]
  coordUS[coordUS$state %in% c("HI"),"x"] &lt;- 0.5       ## rearrange Hawaii[#重新排列夏威夷]
  ## optimal arrangement of the states:[#优化配置的状态:]
  order <- optimal_grid_allocation(coordUS[,1:2],13,6)
  order <- data.frame(names=coordUS$state,order=order)
  ## load US healthy insurance data[#负载的美国健康保险数据]
  data(USdata1)
  data(USdata2)
  nam <- names(USdata1)
  ## delete previous order (optional)[#删除以前的订单(可选)]
  USdata1 <- USdata1[,-which(names(USdata1)=="order")]
  ## combine data and ordering:[#结合数据和顺序:]
  USdata1 <- merge(USdata1,order,all.x=TRUE,all.y=FALSE)
#  USdata1[is.na(USdata1$order),"order"] &lt;- 14[USdata1 [is.na(USdata1顺序),“命令”] < -  14]
  USdata1 <- USdata1[,nam]
  ## define directory with flags (pnm's):[#定义目录标志(PNM):]
  dirflags_us=paste(dirflags,"USStates/",sep="")
  USdata2[,3] <- USdata2[,3]*100
  ## Not run: [#不运行:]
  checkerplot(USdata2[,-2], cols=13, rows=6, geom="bar",
            title="US private health insurance (in % of the population)",
            title.size=18, ylabels=c(30,60,90), ybreaks=c(30,60,90),
            img=dirflags_us, margin_yaxis=-0.05, margin_yaxis2=-0.2,
                    margin_xaxis=-0.4, margin_xaxis2=0,  
                    formatter=function(x,...) {sprintf("%.1f", x)})

## End(Not run)[#(不执行)]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-10 06:16 , Processed in 0.026597 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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