[datatable-help] Conflict in the use of "J" between the packages.

jim holtman jholtman at gmail.com
Mon Jan 16 14:43:31 CET 2012


I was having some problems with some code and noticed that there is a
conflict in the use of "J" between the packages 'data.table' and
'XLConnect'.

Is there some way around them if I want to use these packages together?

===================================
> require(plyr)
Loading required package: plyr
> J
Error: object 'J' not found
No suitable frames for recover()
> require(data.table)
Loading required package: data.table
data.table 1.7.7  For help type: help("data.table")
> require(XLConnect)
Loading required package: XLConnect
Loading required package: XLConnectJars
Loading required package: rJava

Attaching package: ‘rJava’

The following object(s) are masked from ‘package:data.table’:

    J

XLConnect 0.1-7 by Mirai Solutions GmbH <xlconnect at mirai-solutions.com>
http://www.mirai-solutions.com ,
http://miraisolutions.wordpress.com
> J
function (class, method, ...)
if (nargs() == 1L && missing(method)) jclassName(class) else .jrcall(class,
    method, ...)
<environment: namespace:rJava>
> ?J
starting httpd help server ... done
===================================

Here is the type of error message that I get:

> source('clipboard')  # running my script
start (1) - eval.with.vis : 08:39:25 <0.8 9.3> 9.3 : 14.6MB
./Puyallup Inventory - 71398292.txt 2011-12-17 17:03:48 (1) -
f.latestFile : 08:39:25 <0.8 9.3> 9.3 : 14.6MB
./Puyallup Slots - 71398480.txt 2011-12-17 18:59:18 (1) - f.latestFile
: 08:39:26 <2.2 10.8> 10.8 : 25.4MB
Loading required package: XLConnect
Loading required package: XLConnectJars
Loading required package: rJava
XLConnect 0.1-7 by Mirai Solutions GmbH <xlconnect at mirai-solutions.com>
http://www.mirai-solutions.com ,
http://miraisolutions.wordpress.com
./Puyallup Planogram Count - 72009483.txt 2012-01-13 12:51:23 (1) -
f.latestFile : 08:39:30 <5.3 14.0> 14.0 : 24.6MB
plano (1) - eval.with.vis : 08:39:30 <5.5 14.1> 14.1 : 26.9MB
Loading required package: data.table
data.table 1.7.7  For help type: help("data.table")

Attaching package: ‘data.table’

The following object(s) are masked from ‘package:rJava’:

    J

Loading required package: plyr
Error in `[.data.frame`(x, i, j, drop) :
  Value of SET_STRING_ELT() must be a 'CHARSXP' not a 'character'

Enter a frame number, or 0 to exit

 1: source("clipboard")
 2: eval.with.vis(ei, envir)
 3: eval.with.vis(expr, envir, enclos)
 4: dlply(aisle, .(div), function(.div) {
 5: llply(.data = pieces, .fun = .fun, ..., .progress = .progress,
.parallel = .parallel)
 6: loop_apply(n, do.ply)
 7: function (i)
 8: pieces[[i]]
 9: `[[.indexed_df`(pieces, i)
10: structure(x$data[x$index[[i]], , drop = FALSE], vars = x$vars)
11: x$data[x$index[[i]], , drop = FALSE]
12: `[.data.table`(x$data, x$index[[i]], , drop = FALSE)
13: `[.data.frame`(x, i, j, drop)

Selection: 0
>
-- 

I can get around it by loading 'data.table' first right now
Jim Holtman
Data Munger Guru

What is the problem that you are trying to solve?
Tell me what you want to do, not how you want to do it.


More information about the datatable-help mailing list