[datatable-help] Problem with data.table and FastRWeb
Arunkumar Srinivasan
aragorn168b at gmail.com
Mon Feb 17 12:58:55 CET 2014
Mel,
I'm not able to reproduce this on 1.8.11. Which version are you using?
I'm not aware of this package, and what 'otable' is supposed to do. But I
get no output while running your script, and not the error message as well.
On Mon, Feb 17, 2014 at 11:14 AM, Bacou, Melanie <mel at mbacou.com> wrote:
> Hi,
>
> I am testing an R script using FastRWeb (through Rserve). FastRWeb works
> as expected and I can successfully runs Simon Urbanek's examples. Problems
> arise when I try to merge datatables. It seems FastRWeb cannot find
> merge.data.table().
>
> I'm using plenty of other libraries (ggplot, raster, RJDBC, etc.) that
> execute successfully through FastRWeb scripts, so I'm guessing it's
> something peculiar to data.table.
>
> Thanks for any help! --Mel.
>
>
> Here are reproducible examples.
>
> Test #1: the code below (the entire content of my R script) SUCCEEDS:
>
> # test1.R
> library(data.table)
>
> run <- function(...) {
> oclear()
> d1 <- data.table(a=c(1,2,3), b=c("a","b","c"))
> d2 <- data.table(e=c("v","a","b"), f=c(4,6,7))
> otable(d1)
> otable(d2)
> }
>
> This returns a simple web page showing 2 tables:
> 1 a 2 b 3 c v 4 a 6 b 7
>
> Test #2: the code below (the entire content of my R script) FAILS with:
> Error in `[.default`(x, i) : invalid subscript type 'list'
>
> # test2.R
> library(data.table)
>
> run <- function(...) {
> oclear()
> d1 <- data.table(a=c(1,2,3), b=c("a","b","c"))
> d2 <- data.table(e=c("v","a","b"), f=c(4,6,7))
> otable(d1)
> otable(d2)
> setkey(d1, b)
> setkey(d2, e)
> otable(d1[d2])
> }
>
>
>
>
> --
> Melanie BACOU
> International Food Policy Research Institute
> Agricultural Economist, HarvestChoice
> Work +1(202)862-5699
> E-mail mel at mbacou.com
> Visit harvestchoice.org
>
>
> _______________________________________________
> datatable-help mailing list
> datatable-help at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/datatable-help/attachments/20140217/edec2a78/attachment.html>
More information about the datatable-help
mailing list