*! version 0.31

Title

strofnum -- transform a numeric variable to a string variable using
the value label if it exists. Otherwise the format is used.

Syntax

strofnum
varlist(min=1)
[,
options]

Main
keep Option for keeping the original numeric variables.
The original variable name is renamed with a __ prefix and placed after the new
string variable

Description

strofnum transforms a numeric variable into a string variable with
based on the value label if it exists. Otherwise the attached format is used

The variable label is copied to the new variable.

Examples

`"sysuse auto, clear"'

`"strofnum foreign"'

`"sysuse auto, clear"'

`"format %tdCCYY-NN-DD rep78"'

`"strofnum foreign rep78, keep"'

Authors and support

Author:

Niels Henrik Bruun,

Aalborg University Hospital

Support:

niels.henrik.bruun@gmail.com