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

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

[复制链接]
发表于 2012-9-29 22:28:33 | 显示全部楼层 |阅读模式
cbreaks(scales)
cbreaks()所属R语言包:scales

                                        Compute breaks for continuous scale.
                                         计算规模连续截断。

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

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

This function wraps up the components needed to go from a continuous range to a set of breaks and labels suitable for display on axes or legends.
此功能包从一个连续范围内的一组适合截断和标签上显示轴或传说所需要的组件。


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


  cbreaks(range, breaks = pretty_breaks(),
    labels = scientific_format())



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

参数:range
numeric vector of length 2 giving the range of the underlying data
的长度为2的范围内的底层数据的数值向量


参数:breaks
either a vector of break values, or a break function that will make a vector of breaks when given the range of the data
断点值可以是矢量,或在给定的范围内的数据时,这将使一个矢量的中断的中断功能


参数:labels
either a vector of labels (character vector or list of expression) or a format function that will make a vector of labels when called with a vector of breaks. Labels can only be specified manually if breaks are - it is extremely dangerous to supply labels if you don't know what the breaks will be.
标签的向量(矢量字符或列表的表达)或格式的功能,将一个向量的标签调用时使用的向量截断。标签只能手动指定,如果截断 - 这是极其危险的,提供标签,如果你不知道什么截断。


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


cbreaks(c(0, 100))
cbreaks(c(0, 100), pretty_breaks(3))
cbreaks(c(0, 100), pretty_breaks(10))
cbreaks(c(1, 100), log_breaks())
cbreaks(c(1, 1e4), log_breaks())

cbreaks(c(0, 100), labels = math_format())
cbreaks(c(0, 1), labels = percent_format())
cbreaks(c(0, 1e6), labels = comma_format())
cbreaks(c(0, 1e6), labels = dollar_format())
cbreaks(c(0, 30), labels = dollar_format())

# You can also specify them manually:[您也可以手动指定它们:]
cbreaks(c(0, 100), breaks = c(15, 20, 80))
cbreaks(c(0, 100), breaks = c(15, 20, 80), labels = c(1.5, 2.0, 8.0))
cbreaks(c(0, 100), breaks = c(15, 20, 80),
  labels = expression(alpha, beta, gamma))

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-14 04:38 , Processed in 0.039508 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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