 |
Forums |
Admin Discussion Forums: help Start New Thread
By: ben woodcroft
RE: RSRuby and data sets [ reply ] 2008-09-29 12:01
|
Hi Alex,
Thanks for that. The first solution didn't work:
>> r.library('GO.db')
>> r.get('GO:0005886', r.GOCCCHILDREN)
RException: Error in as.environment(pos) : invalid object for 'as.environment'
from /usr/lib/ruby/gems/1.8/gems/rsruby-0.5/lib/rsruby.rb:148:in `lcall'
from /usr/lib/ruby/gems/1.8/gems/rsruby-0.5/lib/rsruby.rb:148:in `method_missing'
from (irb):9
But the hacky solution did the trick. Thanks for that. Will abstract it away so it can be changed in the future.
I've found I don't work well with Bioconductor.
Thanks,
ben
|
By: Alex Gutteridge
RE: RSRuby and data sets [ reply ] 2008-09-29 10:54
|
Does:
r.get('GO:0005886', r.GOCCCHILDREN)
Work? If not, you can always descend to r.eval_R for a more hacky solution:
r.eval_R("get('#{go_term}', GOCCCHILDREN)")
I've found that RSRuby doesn't play so well with Bioconductor (or some parts of it anyway), so your mileage may vary.
Alex Gutteridge
|
By: ben woodcroft
RSRuby and data sets [ reply ] 2008-09-24 07:41
|
Hi,
Hopefully there is a simple solution / workaround for a R newbie problem.
I want to use the get() method to extract some data from a dataset. In R, I do this using
> get("GO:0005886", GOCCOFFSPRING)
[1] "GO:0000148" "GO:0000222" "GO:0000223" "GO:0001518" "GO:0001772"
....
(after loading the GO.db library, which is available through Bioconductor.)
Is there a way to do this in RSRuby? I can't call
r.get('GO:0005886', 'GOCCCHILDREN')
Because it requires GOCCCHILDREN to be unquoted.
Thanks,
ben
|
|
 |