csvToUMF(unmarked)
csvToUMF()所属R语言包:unmarked
Convert .CSV File to an unmarkedFrame
。CSV文件转换到一个unmarkedFrame
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function converts an appropriatedly formated comma-separated values file (.csv) to a format usable by unmarked's fitting
这个函数把一个appropriatedly格式的逗号分隔值文件(CSV)的格式可用,无人盯防的配件
用法----------Usage----------
csvToUMF(filename, long=FALSE, type, species, ...)
参数----------Arguments----------
参数:filename
string describing filename of file to read in
字符串,来描述文件名的文件中读取
参数:long
FALSE if file is in long format or TRUE if file is in long format (see Details)
FALSE:如果文件是在长格式或TRUE:如果文件是在长格式(见详情)
参数:species
if data is in long format with multiple species, then this can specify a particular species to extract if there is a column named "species".
如果数据是在与多个物种的长格式,那么这可以指定一个特定的物种中提取,如果有一个名为“种”的列。
参数:type
specific type of unmarkedFrame.
特定类型的unmarkedFrame。
参数:...
further arguments to be passed to the unmarkedFrame constructor. </table>
进一步传递参数给的unmarkedFrame构造。 </ TABLE>
Details
详细信息----------Details----------
This function provides a quick way to take a .csv file with headers named as described below and provides the data required and returns of data in the format required by the model-fitting functions in unmarked. The .csv file can be in one of 2 formats: long or wide. See the first 2 lines of the examples for what these formats look like.
此功能提供了一种快速的方式,采取的。csv文件的标题命名为,并提供所需的数据,并返回数据的格式模型的拟合函数在unmarked。可以在2格式:长或宽。csv文件。这些格式的样子,请参阅第2行的例子。
The .csv file is formatted as follows:
csv文件格式如下:
col 1 is site labels.
COL 1是网站的标签。
if data is in long format, col 2 is date of observation.
如果数据是在长格式,第2栏是日期的观察。
next J columns are the observations (y) - counts or 0/1's.
未来的J列的意见是(Y) - 数或0/1“。
next is a series of columns for the site variables (one column per variable). The column header is the variable name.
其次是一系列的站点变量(每个变量的一列)的列,用于。列标题是变量名。
next is a series of columns for the observation-level variables. These are in sets of J columns for each variable, e.g., var1-1 var1-2 var1-3 var2-1 var2-2 var2-3, etc. The column header of the first variable in each group must indicate the variable name.
接下来是一系列的观察变量列。这些都是在台J列的每个变量,例如,VAR1-1 VAR1-2 VAR1,VAR2-1 VAR2-2 VAR2-3,每个组的第一个变量的列标题必须注明变量的名称。
值----------Value----------
an unmarkedFrame object
unmarkedFrame对象
(作者)----------Author(s)----------
Ian Fiske <a href="mailto:ianfiske@gmail.com">ianfiske@gmail.com</a>
实例----------Examples----------
head(read.csv(system.file("csv","frog2001pcru.csv", package="unmarked")))
# examine a correctly formatted wide .csv[检查正确的格式化宽的。csv]
head(read.csv(system.file("csv","widewt.csv", package="unmarked")))
# convert them![将它们转换!]
dat1 <- csvToUMF(system.file("csv","frog2001pcru.csv", package="unmarked"),
long = TRUE, type = "unmarkedFrameOccu")
dat2 <- csvToUMF(system.file("csv","frog2001pfer.csv", package="unmarked"),
long = TRUE, type = "unmarkedFrameOccu")
dat3 <- csvToUMF(system.file("csv","widewt.csv", package="unmarked"),
long = FALSE, type = "unmarkedFrameOccu")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|