小编lui*_*lez的帖子

无法从github安装R-package

我正在尝试从github安装flowIncubator包(链接到包:https://github.com/RGLab/flowIncubator).我正在使用R版本3.3.1(2016-06-21).我试过这段代码: devtools::install_github("RGLab/flowIncubator")得到这个错误:

  Error in curl::curl_fetch_disk(url, x$path, handle = handle) : 
      Timeout was reached
    > traceback()
    12: .Call(R_curl_fetch_disk, url, handle, path, "wb", nonblocking)
    11: curl::curl_fetch_disk(url, x$path, handle = handle)
    10: request_fetch.write_disk(req$output, req$url, handle)
    9: request_fetch(req$output, req$url, handle)
    8: request_perform(req, hu$handle$handle)
    7: httr::GET(url, path = path, httr::write_disk(path = tmp))
    6: remote_package_name.github_remote(remote)
    5: remote_package_name(remote)
    4: FUN(X[[i]], ...)
    3: vapply(remotes, install_remote, ..., FUN.VALUE = logical(1))
    2: install_remotes(remotes, quiet = quiet, ...)
    1: devtools::install_github("RGLab/flowIncubator")
Run Code Online (Sandbox Code Playgroud)

我试图更新两个软件包devtools和curl,我试图将R更新为旧版本,我试图下载.zip文件并通过R studio安装它然后从库加载包.我也尝试直接将包文件放入库中.我使用过函数install.packages(),但无法安装它.

curl r devtools rcurl install.packages

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

如何将是/否行与 dplyr 成比例(最好)?

数据来自这个 RData 数据集

这是脚本:

library(dplyr)
library(ggplot2)
load("brfss2013.RData")

test <- brfss2013 %>%
  select(chcscncr,exract11) %>% 
  filter(chcscncr != "NA" , exract11 != "NA") %>% 
  group_by(exract11,chcscncr) %>% 
  summarise(count = n())
Run Code Online (Sandbox Code Playgroud)

下表中的结果:

> head(test)
Source: local data frame [6 x 3]
Groups: exract11 [3]

                                                  exract11 chcscncr count
                                                    <fctr>   <fctr> <int>
1 Active Gaming Devices (Wii Fit, Dance, Dance revolution)      Yes    19
2 Active Gaming Devices (Wii Fit, Dance, Dance revolution)       No   287
3                                  Aerobics video or class      Yes   800
4                                  Aerobics video or class …
Run Code Online (Sandbox Code Playgroud)

r dplyr

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

标签 统计

r ×2

curl ×1

devtools ×1

dplyr ×1

install.packages ×1

rcurl ×1