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

R语言 RMark包 import.chdata()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-26 23:42:44 | 显示全部楼层 |阅读模式
import.chdata(RMark)
import.chdata()所属R语言包:RMark

                                        Import capture-recapture data sets from space or tab-delimited files
                                         空格或制表符分隔的文件导入捕获 - 再捕获的数据集

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

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

A relatively flexible function to import capture history data sets that include a capture (encounter) history read in as a character string and an arbitrary number of user specified covariates for the analysis.
一个相对灵活的功能导入捕获的历史数据集,其中包括一个捕获(遭遇)的历史中读出一个字符串和一个任意数量的用户指定的协变量的分析。


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


  import.chdata(filename, header = TRUE,
    field.names = NULL, field.types = NULL,
    use.comments = TRUE)



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

参数:filename
file name and path for file to be imported; fields in file should be space or tab-delimited
进口文件的文件名和路径,文件中的字段应该是空格或制表符分隔


参数:header
TRUE/FALSE; if TRUE first line is name of variables
TRUE TRUE / FALSE;如果第一行是变量的名称


参数:field.names
vector of field names if header=FALSE; first field should always be ch - capture history remaining number of fields and their names are arbitrary
向量的字段名,如果头= FALSE;第一个字段应始终CH  - 抓住历史余下的字段数,他们的名字是任意的


参数:field.types
vector identifying whether fields (beyond ch) are numeric ("n") or factor ("f") or should be skipped ("s")
矢量识别字段(超出通道)是否是数字(“n”个)或因子(“f”的),或应该被跳过(“s”的)


参数:use.comments
if TRUE values within /* and */ on data lines are used as row.names for the RMark dataframe. Only use this option if they are unique values.
如果真正的价值在/ *和* /数据线是用来作为row.names的RMark数据框。使用此选项,如果他们独特的价值观。


Details

详细信息----------Details----------

This function was written both to be a useful tool to import data and as an example for more specific import functions that a user may want to write for data files that do not satisfy the requirements of this function. In particular this function will not handle files with fixed-width format files that do not contain appropriate tab or space delimiters between the fields. It also requires that the first field is the capture (encounter) history which is named "ch" and is a character string. The remaining fields are arbitrary in number and type and are user defined based on the arguments to the functions. Variables that will be used for grouping should be defined with the field.type="f". Numeric individual covariates (e.g., weight) should be input as field.type="n". Fields in the file that should not be imported should be assigned field.type="s". The examples below illustrate different uses of the calling arguments to import several different data sets that meet the modest requirements of this function.
此功能是一个有用的工具来导入数据和更具体的导入功能,用户可能要写入的数据文件,此功能不符合要求的一个例子。尤其是此功能将无法处理固定宽度格式的文件不包含相应的选项卡或领域之间的空间分隔符的文件。此外,还要求在第一个字段是捕获(遭遇)的历史,被命名为“路”,是一个字符串。余下的字段是任意的数量和类型和用户定义的函数的参数的基础上。应变量将被用于分组定义与field.type="f"。数字个人的协变量(例如,体重)应该是输入field.type="n"。应该被分配在该文件中的字段,不应导入field.type="s"。下面的例子说明不同用途的调用参数导入多个不同的数据集,以满足此功能的适度要求。

If you specify a frequency for the encounter history, the field name must be freq.  If you use any other name or spelling it will not be recognized and the default frequency of 1 will be used for each encounter history.  This function should not be used with files structured for input into the MARK interface.  To use those types of files, see convert.inp.  It is not neccessary to use either function to create a dataframe for RMark.  All you need to is create a dataframe that meets the specification of the RMark format.  For example, if you are simulating data, you only need to create a dataframe with the fields ch, freq (if differs from 1) and any covariates you want and then you can use process.data on the dataframe.
如果你指定一个频率的遭遇历史,字段名称必须是freq。如果您使用任何其他名称或拼写,它不会被确认,默认频率为1,将用于每次遇到历史。这个函数不应该被用来与输入的MARK接口的结构化的文件。要使用这些类型的文件,请参阅convert.inp。这是没有必要使用这两个函数来创建一个数据框RMark。所有你需要的是创建一个符合规范的RMark格式的数据框。例如,如果你是模拟数据,你只需要创建一个数据框领域的通道,频率(如果不同于1),任何你想要的协变量,然后你可以使用process.data的数据框。

If you have comments in your data file, they should not have a column header (field name in first row).  If use.comments=TRUE the comments are used as row names of the data frame and they must be unique.  If use.comments=FALSE and the file contains comments they are stripped out.
如果您有任何意见或数据文件中的,他们不应该有一个列标题(第一行的字段名)。如果use.comments=TRUE的评论用作行的数据框的名称必须是唯一的。如果use.comments=FALSE和文件中包含注释,他们被剥夺了。


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

A dataframe for use in MARK analysis with obligate ch character field representing the capture (encounter) history and optional covariate/grouping variables.
一个数据框,用于在MARK分析与预留ch字符字段捕捉(遭遇)的历史和可选的协/分组变量。


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



Jeff Laake




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

export.chdata
export.chdata


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



pathtodata=paste(path.package("RMark"),"extdata",sep="/")
example.data<-import.chdata(paste(pathtodata,"example.data.txt",sep="/"),
      field.types=c("n","f","f","f"))
edwards.eberhardt<-import.chdata(paste(pathtodata,"EdwardsandEberhardt.txt",
      sep="/"),field.names="ch",header=FALSE)
dipper<-import.chdata(paste(pathtodata,"dipper.txt",sep="/"),
      field.names=c("ch","sex"),header=FALSE)


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-13 23:05 , Processed in 0.023523 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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