reporting: @table: only print given date range

remove-priordens
Houtan Bastani 2013-03-19 14:23:57 +01:00
parent 59ef4b9e68
commit 1f73c74211
2 changed files with 7 additions and 3 deletions

View File

@ -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 ' ...

View File

@ -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