Commit 6f2ff28d authored by Houtan Bastani's avatar Houtan Bastani
Browse files

reporting: @table: only print given date range

parent 49586d0b
......@@ -75,9 +75,9 @@ assert(ischar(o.config), '@table.table: config file must be a string');
assert(islogical(o.hlines), '@table.table: hlines must be true or false');
assert(islogical(o.vlines), '@table.table: vlines must be true or false');
assert(isint(o.precision), '@table.table: precision must be an int');
assert(isempty(o.range) || (iscell(o.range) && length(o.range) == 2 && ...
ischar(o.range{1}) && ischar(o.range{2})), ...
['@table.table: range is specified as ''{''1999q1'',''1999q2''}''.']);
assert(isempty(o.range) || (isa(o.range, 'dynDates') && o.range.ndat >= 2), ...
['@table.table: range is specified as a dynDates range, e.g. ' ...
'''dynDates(''1999q1''):dynDates(''1999q3'')''.']);
assert(~isempty(o.data), '@table.table: must provide data');
msg = ['@table.table: data must either be a dynSeries or a cell array of ' ...
......
......@@ -40,6 +40,10 @@ else
ds = o.data{o.seriestouse{:}};
end
if ~isempty(o.range)
ds = ds(o.range);
end
%number of left-hand columns, 1 until we allow the user to group data,
% e.g.: GDP Europe
% GDP France
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment