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

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

[复制链接]
发表于 2012-2-26 01:12:01 | 显示全部楼层 |阅读模式
fillUp(MSnbase)
fillUp()所属R语言包:MSnbase

                                         Fills up a vector
                                         填补了一个向量

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

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

This function replaces all the empty characters "" and/or NAs with the value of the closest preceding the preceding non-NA/"" element. The function is used to populate dataframe or matrice columns where only the cells of the first row in a set of partially identical rows are explicitly populated and the following are empty.
此函数替换所有的空字符“""和/或NA与最接近的前前非NA/""元素的值。该函数用来填充dataframe或矩阵的列,其中只有部分相同的行集的第一行的单元明确填充,下面是空的。


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


fillUp(x)



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

参数:x
a vector.  
一个向量。


值----------Value----------

A vector as x with all empty characters "" and NA values replaced by the preceding non-NA/"" value.
一个为向量x所有空字符""和NA取而代之的是前面的非NA/""值的值。


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



Laurent Gatto <lg390@cam.ac.uk>




举例----------Examples----------


d <- data.frame(protein=c("Prot1","","","Prot2","",""),
                peptide=c("pep11","","pep12","pep21","pep22",""),
                score=c(1:2,NA,1:3))
d
e <- apply(d,2,fillUp)
e
data.frame(e)
fillUp(d[,1])

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-2-3 07:19 , Processed in 0.026137 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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