I ran into a problem that I have not encountered before. When I load the data.table package (version 1.9.4) alone, and then try to subset a dataset to remove a variable I get no issues. However, when I load plyr (version 1.8.2) and dplyr (version 0.4.1) as well, I get the following error (tried the same with a toy dataset as well). Note that the original file is in Excel and I use library(readxl) to read the file into a RData file format. The file as three variables - LINK_ID (numeric), TMC (character), MPORegion (character). The error I get is:
Error in `[.tbl_df`(x, r, vars, with = FALSE) :
unused argument (with = FALSE)
I don't remember encountering this error before. If anyone has any insights on what is going on I would really appreciate it. I tried it on two separate machines (Windows 7) and get the same error. The Sys.Info from both machines are below:
Machine 1 - sysname "Windows", release "7 x64", version "build 7601, Service Pack 1", machine "x86-64"
Machine 2 - sysname "Windows", release "7 x64", version "build 7601, Service Pack 1", machine "x86-64"
Below is the history of the run.
> library(data.table)
data.table 1.9.4 For help type: ?data.table
*** NB: by=.EACHI is now explicit. See README to restore previous behaviour.
> load("vahere.RData")
> vahere[is.na(vahere)] <- "RestofVA"
> vahere <- setDT(vahere)
>
> # Drop link id and identify unique tmc to region
> uniqtmcs <- subset(vahere,select=-c(1))
> library(plyr)
> library(dplyr)
Attaching package: ‘dplyr’
The following objects are masked from ‘package:plyr’:
arrange, count, desc, failwith, id,
mutate, rename, summarise, summarize
The following objects are masked from ‘package:data.table’:
between, last
The following object is masked from ‘package:stats’:
filter
The following objects are masked from ‘package:base’:
intersect, setdiff, setequal, union
> rm(vahere)
> load("vahere.RData")
> vahere[is.na(vahere)] <- "RestofVA"
> vahere <- setDT(vahere)
>
> # Drop link id and identify unique tmc to region
> uniqtmcs <- subset(vahere,select=-c(1))
Error in `[.tbl_df`(x, r, vars, with = FALSE) :
unused argument (with = FALSE)
The input file was corrupted and I apologize for posting on the forum. I did not get any warnings about the file being corrupted and running with another toy dataset gave the exact same error.