as.hyperframe(spatstat)
as.hyperframe()所属R语言包:spatstat
Convert Data to Hyperframe
将数据转换为超帧
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Converts data from any suitable format into a hyperframe.
从任何合适的格式将数据转换成一个超帧。
用法----------Usage----------
as.hyperframe(x, ...)
## Default S3 method:[默认方法]
as.hyperframe(x, ...)
## S3 method for class 'data.frame'
as.hyperframe(x, ..., stringsAsFactors=FALSE)
## S3 method for class 'hyperframe'
as.hyperframe(x, ...)
## S3 method for class 'listof'
as.hyperframe(x, ...)
参数----------Arguments----------
参数:x
Data in some other format.
在一些其他的格式的数据。
参数:...
Optional arguments passed to hyperframe.
可选参数传递给hyperframe。
参数:stringsAsFactors
Logical. If TRUE, any column of the data frame x that contains character strings will be converted to a factor. If FALSE, no such conversion will occur.
逻辑。如果TRUE,任何列的数据框x包含字符串将被转换成到一个factor。如果FALSE,没有这样的转换会发生。
Details
详细信息----------Details----------
A hyperframe is like a data frame, except that its entries can be objects of any kind.
超帧是这样一个数据框,除了它的项目可以是任何类型的对象。
The generic function as.hyperframe converts any suitable kind of data into a hyperframe.
通用功能as.hyperframe任何合适的数据类型转换成一个超帧。
There are methods for the classes data.frame and listof, and a default method, all of which convert data that is like a hyperframe into a hyperframe object. (The method for the class listof converts a list of objects, of arbitrary type, into a hyperframe with one column.) These methods do not discard any information.
有data.frame和listof,默认的方法,所有的数据转换成一个超帧的对象,就像是一个超帧的类的方法。 (方法的类listof的对象列表,任意类型的转换成一个超帧,其中一列)。这些方法不放弃任何信息。
There are also methods for other classes (see as.hyperframe.ppx) which extract the coordinates from a spatial dataset. These methods do discard some information.
也有其他类(as.hyperframe.ppx)为方法提取的坐标从空间数据集。这些方法丢弃一些信息。
值----------Value----------
An object of class "hyperframe" created by hyperframe.
类的一个对象"hyperframe"创建的hyperframe。
字符串转换因素----------Conversion of Strings to Factors----------
Note that as.hyperframe.default will convert a character vector to a factor. It behaves like as.data.frame.
请注意,as.hyperframe.default将转换成字符向量的一个因素。它的行为像as.data.frame。
However as.hyperframe.data.frame does not convert strings to factors; it respects the structure of the data frame x.
但是as.hyperframe.data.frame不将字符串转换的因素,它尊重结构的数据框x。
The behaviour can be changed using the argument stringsAsFactors.
使用参数stringsAsFactors的行为是可以改变的。
(作者)----------Author(s)----------
Adrian Baddeley
<a href="mailto:Adrian.Baddeley@csiro.au">Adrian.Baddeley@csiro.au</a>
<a href="http://www.maths.uwa.edu.au/~adrian/">http://www.maths.uwa.edu.au/~adrian/</a>
and Rolf Turner
<a href="mailto:r.turner@auckland.ac.nz">r.turner@auckland.ac.nz</a>
参见----------See Also----------
hyperframe, as.hyperframe.ppx
hyperframe,as.hyperframe.ppx
实例----------Examples----------
df <- data.frame(x=runif(4),y=letters[1:4])
as.hyperframe(df)
sims <- list()
for(i in 1:3) sims[[i]] <- rpoispp(42)
as.hyperframe(as.listof(sims))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|