Methods

Class/Module Index [+]

Quicksearch

Statsample::PlainText

Public Class Methods

read(filename, fields) click to toggle source
# File lib/statsample/converters.rb, line 123
def read(filename, fields)
  ds=Statsample::Dataset.new(fields)
  fp=File.open(filename,"r")
  fp.each_line do |line|
    row=process_row(line.strip.split(/\s+/),[""])
    next if row==["\x1A"]
    ds.add_case_array(row)
  end
  convert_to_scale_and_date(ds,fields)
  ds.update_valid_data
  fields.each {|f|
    ds[f].name=f
  }
  ds
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.