Joins vignettes aren't done yet 😔. It is planned for v1.9.8. Will work on it 
after wrapping up things I am working on now.

Arun
--
Sent from my iPhone

> On 09 Nov 2015, at 02:43, Stefano Grioni <[email protected]> wrote:
> 
> Hello,
> 
> As I was reading through the vignette on data handling and joins, it was not 
> immediately evident to me how to do an update on auto-join using only data 
> table.
> 
> I have managed to do what I need using by using SQL, but I don't find it 
> particularly elegant and performance will probably be terrible on large 
> datasets:
> 
> tmp <- sqldf("select a.Field1, a.Field2, a.Field3, b.Output from MyDataset a 
> INNER JOIN MyDataset b on a.Field1 =b.Field1 and a.Field2 = b.Field2+1and 
> a.Field3=b.Field3")
> tmp <- as.data.table(tmp)
> setkey(MyDataset, Field1, Field2, Field3)
> setkey(tmp, Field1, Field2, Field3)
> MyDataset[tmp,Field4 := i.Output, nomatch=0]
> 
> I tried to do the same using twice the same data frame but I can't see how to 
> integrate the join condition on Field2 (see above).
> 
> Is there an elegant way to address this?
> 
> Many thanks
> 
> Stefano
> _______________________________________________
> datatable-help mailing list
> [email protected]
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help
_______________________________________________
datatable-help mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help

Reply via email to