3
我有一个序列数据集,其中时间戳是在几秒钟内从epoch:格式化时间戳以避免R/TraMineR崩溃?
id event time end
1 723 opened 1356963741 1356963741
2 722 opened 1356931342 1356931342
3 721 referenced 1356988206 1356988206
4 721 referenced 1356988186 1356988186
5 721 closed 1356988186 1356988186
6 721 merged 1356988186 1356988186
7 721 closed 1356988186 1356988186
8 721 merged 1356988186 1356988186
9 721 discussed 1356966433 1356966433
10 721 discussed 1356963870 1356963870
我想创建一个STS
序列对象:
sequences.sts <- seqformat(data, from="SPELL", to="STS",
begin="time", end="end", id="id", status="event", limit=slmax)
sequences.sts <- seqdef(sequences.sts)
summary(sequences.sts)
然而,当我这样做,RStudio崩溃,并或多或少地冻结了我的整个电脑。通过与其他代码运行良好的代码进行比较,该代码在“时间”列中使用了一位数的数字,我认为我已经将问题确定为时间戳。难道R/RStudio/TraMineR只是从很长的时间戳中被重载?
我也可以减少时间戳到简单的排序,像这样:http://stackoverflow.com/questions/19684394/replacing-seconds-since-the-epoch-with-ordered-digits-in-r我应该期望这种方法有明显的偏见吗?或者,如果我只是计算基于事件顺序的序列统计量,而不一定是持续时间,那么它会好吗? – histelheim
两者都有感官。你应该根据你的研究问题来选择。 –