Sha256: 51c6377376a917772c23faab64c42ecbd6ccb8b1fce5761246b493cb91362c53
Contents?: true
Size: 783 Bytes
Versions: 8
Compression:
Stored size: 783 Bytes
Contents
- filename = 'R-png_' << rand(10000).to_s unless defined? filename and filename - text = filename unless defined? text and text - width = 500 unless defined? width and width - height = 500 unless defined? height and height - plot = block.call unless (defined? plot and plot) or not defined? block - filename += '.png' unless filename =~ /\.png$/i = resource filename, text, :image do |filename| - TmpFile.with_file(plot) do |plot_file| - if defined? data - data.R "rbbt.require('readr'); plot_str <- read_file('#{ plot_file }'); rbbt.png_plot('#{filename}', plot_str, width=#{width}, height=#{height})" - else - R.run "rbbt.require('readr'); plot_str <- read_file('#{ plot_file }'); rbbt.png_plot('#{filename}', plot_str, width=#{width}, height=#{height})"
Version data entries
8 entries across 8 versions & 1 rubygems