add.col(spaa)
add.col()所属R语言包:spaa
Add one column from A to B, according to one column of common name.
添加一列从A到B,根据一个共同的名字列。
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function can be used to add one column from dataframe B to dataframe A, according to the column names speciefied.
此功能可用于添加一列从数据框乙的数据框一个,根据列名speciefied。
用法----------Usage----------
add.col(inputA, inputB, add, according)
参数----------Arguments----------
参数:inputA
inputA A dataframe which a column to be added according to one row information. Must contain a column name equals to one column name in dataframe B at the least.
inputAA数据框的列加入一个行信息。必须包含列名,列名在数据框乙在至少等于。
参数:inputB
inputB A dataframe which a column to be abstracted from, must contain a column equals to at least one column name in dataframe A.
inputBA数据框的列进行提取,必须包含一列等于至少有一个列名在数据框A.
参数:add
add the column name in dataframe B to be add to dataframe A. musth be character.
add的数据框乙中的列名被添加到数据框A. musth是字符。
参数:according
according the comman column name specified to match the data entries from dataframe A and dataframe B. must be character.
according comman指定的列名相匹配的数据项,数据框和数据框B.必须是字符。
Details
详细信息----------Details----------
This function can be used to add one column from dataframe B to dataframe A, according to the column names speciefied. Users have to make sure the to dataframes at least share the common names speciesfied. This function may be an alternative for merge
此功能可用于添加一列从数据框乙的数据框一个,根据列名speciefied。用户有以确保在dataframes至少有着共同的名字speciesfied。此功能可能替代merge
(作者)----------Author(s)----------
Jinlong Zhang
参见----------See Also----------
See Alsomerge
请参见merge
实例----------Examples----------
data(splist)
data(testdata)
## add genera from dataframe B to dataframe A.[#属从数据框乙到数据框A.]
add.col(inputA = testdata, inputB = splist, add = "genera",
according = "species")
## add family from dataframe B to dataframe A.[#添加家庭从数据框乙A.数据框]
add.col(inputA = testdata, inputB = splist, add = "family",
according = "species")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|