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

R语言 spacetime包 unstack()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 12:14:05 | 显示全部楼层 |阅读模式
unstack(spacetime)
unstack()所属R语言包:spacetime

                                         write STFDF to table forms
                                         以表格形式写STFDF

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

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

create table forms of STFDF objects
创建表形式的STFDF对象


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


## S3 method for class 'STFDF'
unstack(x, form, which = 1, ...)
## S3 method for class 'STFDF'
as.data.frame(x, row.names, ...)



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

参数:x
object of class STFDF
对象的类STFDF


参数:form
formula; can be omitted  
公式;可以省略


参数:which
column name or number to have unstacked  
列的名称或编号,拆散


参数:row.names
row.names for the data.frame returned  
row.names传回的数据框


参数:...
arguments passed on to the functions unstack  or as.data.frame
参数传递的功能拆散或as.data.frame的


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

unstack returns the data in wide format, with each row representing a spatial entity and each column a time; see unstack for details and default behaviour.
unstack返回的数据在宽屏幕格式,每一行代表一个空间实体,每一列的时间;拆散的详细信息和默认行为。

as.data.frame returns the data.frame in long format, where the coordinates of the spatial locations (or line starting coordinates, or polygon center points) and time stamps are recycled accordingly.
as.data.frame在长格式的数据框,其中相应的坐标的空间位置(或行的起始坐标,或多边形的中心点)和时间戳被再循环返回。


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


sp = cbind(x = c(0,0,1), y = c(0,1,1))
row.names(sp) = paste("point", 1:nrow(sp), sep="")
sp = SpatialPoints(sp)
time = xts(1:4, as.POSIXct("2010-08-05")+3600*(10:13))
m = c(10,20,30) # means for each of the 3 point locations[的3点的位置中的每一个的装置,用于]
mydata = rnorm(length(sp)*length(time),mean=rep(m, 4))
IDs = paste("ID",1:length(mydata))
mydata = data.frame(values = signif(mydata,3), ID=IDs)
stfdf = STFDF(sp, time, mydata)
as.data.frame(stfdf, row.names = IDs)
unstack(stfdf)
t(unstack(stfdf))
unstack(stfdf, which = 2)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-9 20:10 , Processed in 0.023336 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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