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

R语言 secr包 read.capthist()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 00:02:46 | 显示全部楼层 |阅读模式
read.capthist(secr)
read.capthist()所属R语言包:secr

                                         Import or export data
                                         导入或导出数据

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

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

Data in the DENSITY formats for capture data and trap layouts may be imported as a capthist object for analysis in secr. Data in a capthist object may also be exported in these formats for use in DENSITY (Efford 2009). read.capthist inputs data from text files and constructs a capthist object in one step using the functions read.traps and make.capthist.
捕获的数据和陷阱布局的密度格式中的数据可以被导入一个capthist对象分析,secr。还可以导出在一个capthist对象的这些格式的数据,使用的密度(Efford 2009年)。 read.capthist输入数据从文本文件中,并构建了一个capthist对象在一个步骤中使用的功能read.traps和make.capthist。


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



read.capthist(captfile, trapfile, detector = "multi", fmt = "trapID",
    noccasions = NULL, covnames = NULL, trapcovnames = NULL,
    cutval = NULL, verify = TRUE, noncapt = "NONE", ...)

write.capthist(object, filestem = deparse(substitute(object)),
     sess = "1", ndec = 2, covariates = FALSE, ...)




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

参数:captfile
name of capture data file  
捕获的数据文件的名称


参数:trapfile
name of trap layout file  
的陷阱布局文件的名称


参数:detector
character value for detector type ("single", "multi" etc.)  
探测器类型的字符值(单,多等)


参数:fmt
character value for capture format ("XY" or "trapID")  
捕获格式(字符值XY或trapID的)


参数:noccasions
number of occasions on which detectors were operated  
的场合上,探测器操作


参数:covnames
character vector of names for individual covariate fields in "captfile"
中字符向量的个别协字段名称“captfile”


参数:trapcovnames
character vector of names for detector covariate fields in "trapfile"
中字符向量探测器协字段的名称在“trapfile”


参数:cutval
numeric, threshold of signal strength for "signal" detector type   
数字的“信号”探测器类型,信号强度阈值


参数:verify
logical if TRUE then the resulting capthist object is checked with verify
逻辑如果是TRUE,那么得到的capthist的对象是检查verify的


参数:noncapt
character value; animal ID used for "no captures"  
字符值;用于“没有捕获的动物ID”


参数:...
other arguments passed to read.table, write.table and count.fields  
其他参数传递给read.table,write.table和count.fields


参数:object
capthist object with the captures and trap locations to export  
capthist对象的捕捉和陷阱的位置,以便出口


参数:filestem
character value used to form names of output files  
使用的字符值形成的输出文件的名称


参数:sess
character session identifier  
字符的会话标识符


参数:ndec
number of digits after decimal point for x,y coordinates  
x,y坐标的小数点后的位数


参数:covariates
logical or a character vector of covariates to export  
逻辑或字符向量的协变量的出口


Details

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

read.capthist
read.capthist

captfile should record one detection on each line. A detection comprises a session identifier, animal identifier, occasion number (1, 2,...,S where S is the number of occasions), and a detector identifier (fmt = "trapID") or X- and Y-coordinates (fmt = "XY"). Each line of trapfile has a detector identifier and its X- and Y-coordinates. In either file type the identifiers (labels) may be numeric or alphanumeric values. Values should be separated by blanks or tabs unless (i) the file name ends in ".csv" or (ii) sep = "," is passed in ..., in which case commas are assumed. Blank lines and any text after "#" are ignored. For further details see ../doc/secr-datainput.pdf, make.capthist and "Data formats" in the help for DENSITY.
captfile应记录每行一个检测。 A检测包括会话标识符,动物标识符,场合数目(1,2,...,S这里S是的数目的场合),和一个检测器的标识符(fmt = "trapID")或X-和Y坐标( fmt = "XY"“)。的每一行trapfile具有检测器标识符和它的X-和Y-坐标。在这两种文件类型的标识符(标签),可能是数字或字母。应该用空格或制表符分隔的值,除非(i)的文件名以“。CSV或(ii)sep = ","是通过在...,在这种情况下,被认为逗号。 “#”后的空白行和任何文本将被忽略。有关进一步详情,请参阅/ DOC /秘书服务datainput.pdf,make.capthist和“数据格式”中密度的帮助。

The noccasions argument is needed only if there were no detections on the final occasion; it may be a positive integer (constant across all sessions) or a vector of positive integers, one for each session. covnames is needed only when captfile includes individual covariates. Likewise for trapcovnames and detector covariates. Values of noccasions and covnames are passed directly to make.capthist, and trapcovnames is passed to read.traps.
noccasions参数只在最后的时刻,如果没有检测是必要的,它可能是一个正整数(在所有会话不变)或矢量的正整数,为每个会话。 covnames是必要的,只有当captfile包括个人的协变量。同样,对于trapcovnames和检测器的协变量。值的noccasions和covnames直接传递到make.capthist,和trapcovnames传递给read.traps。

A session identifier is required even for single-session capture data. In the case of data from multiple sessions, trapfile may be a vector of file names, one for each session.
会话标识符也需单日捕获的数据。在多个会话中的数据的情况下,trapfile可能是一个矢量文件名,每个会话一个。

Additional data may be coded as for DENSITY. Specifically, captfile may include extra columns of individual covariates, and trapfile may code varying usage of each detector over occasions and detector covariates.
其他数据可以被编码的密度。具体来说,captfile可能包括额外的列个人的变量,和trapfile可以编码不同的使用场合和检测器的协变量的每个探测器。

write.capthist
write.capthist

For a single-session analysis, DENSITY requires one text file of capture data and one text file with detector coordinates (the 'trap layout' file).  write.capthist constructs names for these files by appending "capt.txt" and "trap.txt" to filestem which defaults to the name of the capthist object. If filestem is empty then output goes to the console.
对于一个单一的会话分析,的密度需要一个文本文件中捕获的数据与的检测坐标(“陷阱布局的文件)和一个文本文件。 write.capthist构建这些文件的名称通过追加的“capt.txt”和“trap.txt”filestem默认的名称的capthist对象。如果filestem是空的,然后输出到控制台。

If object contains multiple sessions with differing traps then a separate trap layout file is exported for each session and each file name includes the session name. All capture data are exported to one file regardless of the number of sessions. The DENSITY format used is "TrapID" except when x-y coordinates are specific to a detection (i.e., polygon and transect detectors).
object如果不同的traps然后一个单独的陷阱布局文件导出为每个会话,每个文件名中包含的会话名称,包含多个会话。所有捕获的数据导出到一个文件中,不管会话的数量。除了xy坐标的检测(例如,多边形和样探测器)的密度使用的格式为“TrapID”。

covariates controls the export of both detector and individual covariates. If it is TRUE or FALSE then it is taken to apply to both. A vector of covariate names is used as a lookup for both detector and capthist covariate fields: covariates are exported if their name matches; this may be used to export any combination of (uniquely named) detector and capthist covariates.
covariates控制探测器和个人的协变量的出口。如果是TRUE或FALSE,那么它同时适用于。作为一个向量的协变量的名称查找都的探测器和capthist协领域:的协变量远销如果他们的名字相匹配,这可能是用于出口的唯一命名的探测器和capthist协变量的任意组合。

Existing text files will be replaced without warning. In the case of a multi-session capthist file, session names are taken from object rather than sess. Session names are truncated to 17 characters with blanks and commas removed.
不发出警告的情况下,将取代现有的文本文件。在情况一个多会话capthist的文件,会话名取自object而不是sess。会议名称被截断为17个字符,空格和逗号去掉。

To export data in comma-delimited (".csv") format, pass sep =   "," in .... The resulting files have extension ".csv" rather than ".txt" and may be opened with spreadsheet software.
要导出数据以逗号分隔(CSV)格式,通过sep =   ","...生成的文件的扩展名“CSV”,而非“文本”,可以打开电子表格软件。


注意----------Note----------

The DENSITY formats accommodate "single", "multi" and "proximity" data. Data for the newer detector types ("count", "signal", "polygon", "polygonX", "transect" and "transectX") may be input using the DENSITY formats with minor variations. They may also be output with write.capthist, but a warning is given that DENSITY does not understand these data types. See detector and ../doc/secr-datainput.pdf for more.
密度格式容纳单,多和接近的数据。使用密度格式,有少许变化为较新的检测器的类型(“计数”,“信号”,“多边形”,polygonX,断面和transectX)的数据可被输入。他们也可能是输出与write.capthist,但一个警告信息,,密度不明白这些数据类型。见detector.. / DOC / SECR datainput.pdf的更多。

The ... argument is useful for some special cases. For example, if your input uses ";" instead of "#" for comments (";" is also valid in DENSITY) then set comment.char = ";" in read.capthist.
该...的说法是某些特殊情况下非常有用。例如,如果你输入使用;,而不是#注释(“;”也是有效的密度),然后设置comment.char = ";"中read.capthist。

In a similar fashion, write comma- or tab-separated values by setting sep = "," or sep = "\t" respectively.
以类似的方式,通过设置sep = ","或sep = "\t"分别写逗号或制表符分隔值。

The arguments of count.fields are a subset of those of read.table so ... is limited to any of {sep, quote, skip, blank.lines.skip, comment.char}.
count.fields的参数的一个子集那些read.table“这样的... {九月,报价,跳跃,blank.lines.skip,comment.char}是有限的。

If you fail to set fmt correctly in read.capthist then the error message from verify may be uninformative.
如果你没有设置fmt正确read.capthist然后verify的错误信息可能是最不对。


参考文献----------References----------

capture–recapture. Department of Zoology, University of Otago, Dunedin, New Zealand http://www.otago.ac.nz/density.

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

read.traps, make.capthist, write.captures, write.traps, read.table
read.traps,make.capthist,write.captures,write.traps,read.table


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



## export ovenbird capture histories[出口ovenbird捕捉历史]
## the files 'ovenCHcapt.txt' and 'ovenCHtrap.txt' are[#的文件“ovenCHcapt.txt的”和“ovenCHtrap.txt”]
## placed in the current folder (check with dir())[#放置在当前文件夹(目录(查询))]

write.capthist(ovenCH)


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-30 10:47 , Processed in 0.022991 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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