Sha256: 5429e2d7e01065dd02ceb024e9c902e9563255c603563d5216db7f12e7a5ef64
Contents?: true
Size: 508 Bytes
Versions: 10
Compression:
Stored size: 508 Bytes
Contents
# Support for converting data to R data structures to support rserve-client module Daru class DataFrame def to_REXP # rubocop:disable Style/MethodName names = @vectors.to_a data = names.map do |f| Rserve::REXP::Wrapper.wrap(self[f].to_a) end l = Rserve::Rlist.new(data, names.map(&:to_s)) Rserve::REXP.create_data_frame(l) end end class Vector def to_REXP # rubocop:disable Style/MethodName Rserve::REXP::Wrapper.wrap(to_a) end end end
Version data entries
10 entries across 10 versions & 1 rubygems