relevel(stats)
relevel()所属R语言包:stats
Reorder Levels of Factor
重新排列因子水平
译者:生物统计家园网 机器人LoveR
描述----------Description----------
The levels of a factor are re-ordered so that the level specified by ref is first and the others are moved down. This is useful for contr.treatment contrasts which take the first level as the reference.
水平的一个因素是重新排列,使ref指定的水平是第一次和别人都搬下来。这是有用contr.treatment对比,作为参考的第一级。
用法----------Usage----------
relevel(x, ref, ...)
参数----------Arguments----------
参数:x
An unordered factor.
一个无序的因素。
参数:ref
The reference level.
参考电平。
参数:...
Additional arguments for future methods.
未来的方法额外的参数。
值----------Value----------
A factor of the same length as x.
为x相同长度的一个因素。
参见----------See Also----------
factor, contr.treatment, levels, reorder.
factor,contr.treatment,levels,reorder。
举例----------Examples----------
warpbreaks$tension <- relevel(warpbreaks$tension, ref="M")
summary(lm(breaks ~ wool + tension, data=warpbreaks))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|