-4

I want to select rows from a.xdf file based on a categoryid only if vector b has those category ids in it.

rxDataStep(inData = "a.xdf", outFile = "final.xdf",rowSelection= ?,overWrite=TRUE)

Can anyone please help.

Csislander
  • 2,100
  • 1
  • 13
  • 16

1 Answers1

2

I would guess ..., rowSelection=categoryid %in% b, ... though I do not have Revolution R to test it out.

MrFlick
  • 195,160
  • 17
  • 277
  • 295
  • I tried that and this is the error I get Error in eval(expr, envir, enclos) : object 'b' not found. – user3624447 May 11 '14 at 01:02
  • Well, is `b` defined? Is it a local variable in your R script? That doesn't appear in your sample so it's hard to tell. How many elements are in there? – MrFlick May 11 '14 at 01:07
  • 2
    Hmm. Looks like they may be executing in a different environment. what if you also pass a `transformObjects = list(b = b)` parameter to `rxDataStep` – MrFlick May 11 '14 at 01:09
  • It was a local variable in my R script. But transformObjects worked perfect. Thanks a lot! – user3624447 May 11 '14 at 01:32