Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: New version of -chardef- on SSC

From   Roger Newson <>
To   "" <>
Subject   st: New version of -chardef- on SSC
Date   Wed, 22 Jun 2011 16:21:11 +0100

Thanks once again to Kit Baum, a new version of the -chardef- package is now available for download from SSC. In Stata, use the -ssc- command to do this, or -adoupdate- if you already have an old version of -chardef-.

The -chardef- package is described as below on my website. The new version fixes a bug (caused by a missing -capture:- prefix), which caused the -charundef- module occasionally to fail with a confusing error message. I have also fixed the same bug in the Stata Version 10 version of -chardef-, which users of Stata Version 10 can download by typing, in Stata,

net from

and selecting and installing -chardef-.

Best wishes


Roger B Newson BSc MSc DPhil
Lecturer in Medical Statistics
Respiratory Epidemiology and Public Health Group
National Heart and Lung Institute
Imperial College London
Royal Brompton Campus
Room 33, Emmanuel Kaye Building
1B Manresa Road
London SW3 6LR
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322
Web page:
Departmental Web page:

Opinions expressed are those of the author, not of the institution.

package chardef from

      chardef: Assign values to a characteristic of a list of variables

      chardef is a mass-production version of the char define
      command.  It assigns a list of values to a named
      characteristic of a list of variables specified by a varlist.
      If the varlist is not supplied, then chardef assigns the
      values to the named characteristic for all variables in the
      dataset currently in the memory.  If the named characteristic
      is not supplied, then the values are assigned to the
      characteristic varname, used by the list command.  If the list
      of values is shorter than the varlist, then the list of values
      is extended on the right with copies of the last value.
      Optionally, a prefix and/or a suffix may be added to the
      values.  The charundef module resets a list of characteristics
      to empty strings for a list of variables.

      Author: Roger Newson
      Distribution-Date: 21june2011
      Stata-Version: 11

INSTALLATION FILES                                  (click here to install)
(click here to return to the previous screen)
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index