【发布时间】:2020-02-25 16:03:38
【问题描述】:
我正在处理这些数据:
library("RCurl")
library("plm")
library("tibble")
library("dplyr")
library("car")
library("AER")
library("arm")
library("broom")
x <- getURL("https://raw.githubusercontent.com/dothemathonthatone/maps/master/main_merge1.csv")
maindf <- read.csv(text = x)
我正在尝试做一些非常简单的事情:
data <- maindf %>% as_tibble() %>% select(reg_schl, year, age_group, fee_monthly, daily_hours, fee_per_inc, deubthrt_total) %>% print()
我收到以下错误:
Error in select(., reg_schl, year, age_group, fee_monthly, daily_hours, : unused arguments (reg_schl, year, age_group, fee_monthly, daily_hours, fee_per_inc, deubthrt_total)
Traceback:
1. maindf %>% as_tibble() %>% select(reg_schl, year, age_group,
. fee_monthly, daily_hours, fee_per_inc, deubthrt_total) %>%
. print()
2. withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
3. eval(quote(`_fseq`(`_lhs`)), env, env)
4. eval(quote(`_fseq`(`_lhs`)), env, env)
5. `_fseq`(`_lhs`)
6. freduce(value, `_function_list`)
7. function_list[[i]](value)
所以我使用 R 数据尝试了相同的代码:
data(Fatalities, package = "AER")
road <- Fatalities %>%
as_tibble() %>%
select(state, year, beertax, fatal, pop) %>%
print()
我也遇到了同样的错误。
【问题讨论】: