You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use r_package more than once, calls alternate between correctly and fully suppressing echoing from rinruby to allowing some echoing; something is being toggled on/off with each call.
I believe that libraries/default.rb should read
def r_package_installed?(package)
require 'rinruby'
r = RinRuby.new(:echo=>false)
r.eval 'packages = installed.packages()[,1]'
packages = r.pull 'packages'
packages.include?(package)
end
I found that disabling the echo directly on the eval call also works. Just like how it's implemented in the install and remove methods in providers/package.rb. Also by creating a new RinRuby object, you are creating a new R instance and without closing the old instance (created during require 'rinruby') you are working with two R instances of which only 1 is used.
When I use
r_package
more than once, calls alternate between correctly and fully suppressing echoing fromrinruby
to allowing some echoing; something is being toggled on/off with each call.I believe that
libraries/default.rb
should readSee also this comment.
The text was updated successfully, but these errors were encountered: