← Prev in month
← Prev in thread
Next in thread →
Next in month →
ODF New Proposal: Generic Format-Handling Functions
ODF New Proposal: Generic Formats
Summary
Proposal owner: Leonard Mada
Proposal short name: Generic Format-Handling Functions
Rationale
Format data using formats defined in the spreadsheet.
Use cases: Recoding variables / values and displaying custom formats.
SAS allows defining specific formats, e.g.:
PROC FORMAT;
value myFormat
1 = 'Group 1'
2 = 'Group 2'
. = 'Missing'
other = 'Everything else'
;
value myAgeGroups
0 - 10 = '0-10'
11 - 20 = '11-20'
21 - high = '> 20'
. = 'Missing'
;
value myValues
Low = 1
Middle = 2
High = 3
;
run;
Then, some data can be formatted using these formats, e.g.:
Data = {4, 7, 8, 21, 55, ., 12}
Data myAgeGroups. => {'0-10', '0-10', '0-10', '> 20', '> 20', 'Mising',
'11-20'}
SYNTAX:
A new function: =FORMAT(range; {options})
The range is any range in the spreadsheet that consists of 2 columns or
3 columns.
In the case of 2 columns, the first column contains the value that gets
recoded and the second column contains the new value.
In the case of 3 columns: the first column contains the lower limit, the
second column contains the upper limit, and the 3rd column contains the
new value.
OPTIONS:
- is the upper limit included (applies to 3-column range):
0 = use default (as defined in some options; may be removed from spec)
1 = include upper limit and exclude lower limit: (lower limit, upper
limit]
2 = do not include upper limit; lower limit will be included: [lower
limit, upper limit)
This function will define a new format, that can be applied to the
various cells in the spreadsheet. Also, this format may be used to
recode values, using a new function (INPUT() - yet to propose):
= <int> INPUT( cell, format)
= <string> INPUT(cell, format), depending on format type;
Impacts
Conformance:
Backwards compatibility: New feature. Is not backwards compatible.
Accessibility impact: No Accessibility impact
← Prev in month
← Prev in thread
Next in thread →
Next in month →