小编Ste*_*han的帖子

在Wheezy 7.8(Raspbian)上安装R 3.1.2失败

我是Linux的新手,并尝试在我的Raspberry上安装最新的R版本.我的Raspberry在Wheezy 7.8上运行.

我按照CRAN的说明,所以我

  • 添加 deb http://cran.rstudio.com/bin/linux/debian wheezy-cran3//etc/apt/sources.list
  • 跑了apt-get update哪个成功,只给了我一个CRAN网站上指出的公钥的"签名错误"
  • apt-get install r-base

但是最后一个命令的结果是

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.  
The following information may help to resolve the situation:
The following packages have unmet dependencies:  
 r-base : Depends: r-base-core (>= 3.1.2-1~wheezycran3.0) …
Run Code Online (Sandbox Code Playgroud)

apt r raspberry-pi raspbian

7
推荐指数
2
解决办法
5404
查看次数

基于不相等的时间戳联接数据表

我正在解决一个基于不相等的时间戳(POSIXct)合并两个data.tables(尽管也可能是data.frames)的问题。
基于表A中的某个时间戳,我希望R向我返回表B中在A 之前的条目。

一个例子:

我有表A,其中包含有关特定时间点的活动的数据。

编辑:这是与原始帖子不同的数据,可以更好地反映该问题:我需要基于时间戳和一个称为Station ID的分组变量进行“查找”。抱歉,不清楚。

             Start.Time Start.Station.ID
1: 2014-04-06 18:24:32              238
2: 2014-04-06 18:20:30              238
3: 2014-04-06 01:04:13              373
4: 2014-04-06 01:03:36              373
5: 2014-04-06 01:03:37              373
6: 2014-04-06 01:03:01              373
7: 2014-04-06 01:02:42              373
8: 2014-04-06 01:02:31              373
Run Code Online (Sandbox Code Playgroud)

我想在表A中添加一列,以“可用性”表示某个时间点该站的状态。这些状态可以在表B中找到。

              status_dt station_id availability
 1: 2014-04-06 00:29:02        238    0.9354839
 2: 2014-04-06 00:29:02        373    1.0000000
 3: 2014-04-06 01:29:03        238    1.0000000
 4: 2014-04-06 01:29:03        373    0.6111111
 5: 2014-04-06 02:59:03        238 …
Run Code Online (Sandbox Code Playgroud)

r data.table

5
推荐指数
1
解决办法
751
查看次数

标签 统计

r ×2

apt ×1

data.table ×1

raspberry-pi ×1

raspbian ×1