[datatable-help] What is going on with R 3.1 ?

mathematical.coffee mathematical.coffee at gmail.com
Fri Jun 20 02:44:08 CEST 2014


Hi all,

Sorry to resurrect an old thread, but I've been experiencing these problems
too and have come up with a reproducible example (for me anyway).

Data.table 1.9.2, R 3.1.0

I was trying to join some tables and got the usual "rerun with
allow.cartesian=TRUE" message like Michele, and then got this error:

Error in if (!is.null(lhs)) { : missing value where TRUE/FALSE needed

However while I was trying to strip down my data to reproduce the error, I
now consistently get this one instead:

Error in `[.data.table`(x, y, `:=`(female, female)) : 
  object 'bysubl' not found


rather than the TRUE/FALSE one. But they seem to be related.

* x has a column of subjects, some duplicated
* y has a column of subjects, none duplicated, and some not present in x
(all subjects of x are in y though).
* y additionally has a binary column `female` that I wish to join into x

(I know there are other ways to do this, but this is a stripped down example
and seems to point out something going wrong in data.table so it is just an
illustrative example):

```
library(data.table)
x=fread('x.csv')
y=fread('y.csv')
setkey(x, subject)
setkey(y, subject)

x[y]
# Error in vecseq(f__, len__, if (allow.cartesian) NULL else
as.integer(max(nrow(x),  : 
#   Join results in 33 rows; more than 28 = max(nrow(x),nrow(i)). Check for
duplicate key values in i, each of which join to the same group in x over
and over again. If that's ok, try including `j` and dropping `by`
(by-without-by) so that j runs for each group to avoid the large allocation.
If you are sure you wish to proceed, rerun with allow.cartesian=TRUE.
Otherwise, please search for this error message in the FAQ, Wiki, Stack
Overflow and datatable-help for advice.

x[y, female:=female]
Error in `[.data.table`(x, y, `:=`(female, female)) : 
  object 'bysubl' not found
```

I get the above reproducibly with this dataset.

>From now onwards, if I type in 'x' or 'y' into the prompt I get nothing
printed at all. Additionally:

```
tables()
# Error in gettext(domain, unlist(args)) : invalid 'string' value
# Error: argument "finally" is missing, with no default
```

The only solution is to restart the R session.

Note: this *doesn't* occur if the column I try to merge (`female` in this
case) is continuous, for example. I can only get it if it's logical.

I've attached x.csv and y.csv to this email for you to play with.

I think it might be possible to strip down the tables to less rows (x has
28, y has 26) but in my (not exhaustive) attempts to do so, I didn't get
this particular error.

x.csv <http://r.789695.n4.nabble.com/file/n4692401/x.csv>  
y.csv <http://r.789695.n4.nabble.com/file/n4692401/y.csv>  



--
View this message in context: http://r.789695.n4.nabble.com/What-is-going-on-with-R-3-1-tp4689002p4692401.html
Sent from the datatable-help mailing list archive at Nabble.com.


More information about the datatable-help mailing list