Thanks as always to Kit Baum, new versions of the descsave and xdir packages are now available for download from SSC. In Stata, use the ssc command to do this, or adoupdate if you already have old versions of these packages.
The descsave and xdir packages are described as below on my website, and form part of my suite of metadataset-generating routines in Stata. The new versions have been updated in response to the very latest release of Stata Version 16, which is dated 30 September 2019 and which fixes a long list of pre-existing bugs in the frame command. The new descsave and xdir should do the same things as the pre-existing Stata Version 16 versions (with the added frame() option to output results to a data frame), but they should do them more time-efficiently, because they now implement the norestore option using frames instead of using files. I would like to thank all at StataCorp for their prompt and helpful response to the bugs in data frames, to which I and other people drew attention at the beginning of September on the eve of the London Stata Conference.
Users of Stata Versions 10 to 18, and of old releases of Stata Version 19 prior to 30 September 2019, can still download the old Stata Version 10 versions of descsave and xdir from my website by typing, in Stata,
net from "http://www.rogernewsonresources.org.uk/stata10/"
and selecting packages descsave and xdir to download. However, these old versions will not have the frame() option, because data frames are a Stata Version 16 innovation.
Best wishes
Roger
----------------------------------------------------------------------------------------------
package descsave from http://www.rogernewsonresources.org.uk/stata16
----------------------------------------------------------------------------------------------
TITLE
descsave: Save descriptive attributes of variables to a do-file and/or a Stata dataset
DESCRIPTION/AUTHOR(S)
descsave is an extended version of describe, which lists descriptive
attributes for a list of variables in a dataset given by varlist, or for all
variables in the dataset if varlist is not specified. The dataset is the
current dataset in memory, unless using is used to specify a dataset in a
file. The descriptive attributes are variable names, storage types, display
formats, value labels and variable labels (as output by describe), and also
(optionally) a list of characteristics specified by the charlist() option.
descsave creates an output Stata dataset (or resultsset) with one observation
per variable and data on these descriptive attributes. This dataset may be
listed using the list() option and/or saved to a data frame using the frame()
option and/or saved to a file using the saving() option and/or written to the
memory using the norestore or fast option, overwriting any existing dataset.
The file specified by dofile() is a do-file, containing commands which can be
run to reconstruct the descriptive attributes of the variables, assuming that
variables of the same names have been created and are numeric or character as
appropriate. descsave can be used together with export delimited to create a
definitive generic spreadsheet version of the current dataset, together with
a Stata do-file to reconstruct the descriptive attributes of the variables
after the spreadsheet has been input using import delimited.
Author: Roger Newson
Date: 02 October 2019
Stata version: 16
INSTALLATION FILES (click here to install)
descsave.ado
descsave.sthlp
----------------------------------------------------------------------------------------------
(click here to return to the previous screen)
----------------------------------------------------------------------------------------------
package xdir from http://www.rogernewsonresources.org.uk/stata16
----------------------------------------------------------------------------------------------
TITLE
xdir: Create a resultsset with 1 observation per file in a directory
DESCRIPTION/AUTHOR(S)
xdir is an extended version of dir, or of the extended macro function
dir. It creates an output dataset (or resultsset), with 1 observation
for each file in a user-specified directory conforming to a
user-specified pattern, and belonging to a user-specified file type,
and data on the file name and the directory name. This dataset may be
listed using the list() option and/or saved to a data frame using the
frame() option and/or saved to a file using the saving() option and/or
written to the memory using the norestore or fast option, overwriting
any existing dataset. Alternatively (or additionally), a list of the
file names may be saved in a local macro, using the local() option or
the plocal() option.
Author: Roger Newson
Distribution-Date: 02october2019
Stata-Version: 16
INSTALLATION FILES (click here to install)
xdir.ado
xdir.sthlp
----------------------------------------------------------------------------------------------
(click here to return to the previous screen)
The descsave and xdir packages are described as below on my website, and form part of my suite of metadataset-generating routines in Stata. The new versions have been updated in response to the very latest release of Stata Version 16, which is dated 30 September 2019 and which fixes a long list of pre-existing bugs in the frame command. The new descsave and xdir should do the same things as the pre-existing Stata Version 16 versions (with the added frame() option to output results to a data frame), but they should do them more time-efficiently, because they now implement the norestore option using frames instead of using files. I would like to thank all at StataCorp for their prompt and helpful response to the bugs in data frames, to which I and other people drew attention at the beginning of September on the eve of the London Stata Conference.
Users of Stata Versions 10 to 18, and of old releases of Stata Version 19 prior to 30 September 2019, can still download the old Stata Version 10 versions of descsave and xdir from my website by typing, in Stata,
net from "http://www.rogernewsonresources.org.uk/stata10/"
and selecting packages descsave and xdir to download. However, these old versions will not have the frame() option, because data frames are a Stata Version 16 innovation.
Best wishes
Roger
----------------------------------------------------------------------------------------------
package descsave from http://www.rogernewsonresources.org.uk/stata16
----------------------------------------------------------------------------------------------
TITLE
descsave: Save descriptive attributes of variables to a do-file and/or a Stata dataset
DESCRIPTION/AUTHOR(S)
descsave is an extended version of describe, which lists descriptive
attributes for a list of variables in a dataset given by varlist, or for all
variables in the dataset if varlist is not specified. The dataset is the
current dataset in memory, unless using is used to specify a dataset in a
file. The descriptive attributes are variable names, storage types, display
formats, value labels and variable labels (as output by describe), and also
(optionally) a list of characteristics specified by the charlist() option.
descsave creates an output Stata dataset (or resultsset) with one observation
per variable and data on these descriptive attributes. This dataset may be
listed using the list() option and/or saved to a data frame using the frame()
option and/or saved to a file using the saving() option and/or written to the
memory using the norestore or fast option, overwriting any existing dataset.
The file specified by dofile() is a do-file, containing commands which can be
run to reconstruct the descriptive attributes of the variables, assuming that
variables of the same names have been created and are numeric or character as
appropriate. descsave can be used together with export delimited to create a
definitive generic spreadsheet version of the current dataset, together with
a Stata do-file to reconstruct the descriptive attributes of the variables
after the spreadsheet has been input using import delimited.
Author: Roger Newson
Date: 02 October 2019
Stata version: 16
INSTALLATION FILES (click here to install)
descsave.ado
descsave.sthlp
----------------------------------------------------------------------------------------------
(click here to return to the previous screen)
----------------------------------------------------------------------------------------------
package xdir from http://www.rogernewsonresources.org.uk/stata16
----------------------------------------------------------------------------------------------
TITLE
xdir: Create a resultsset with 1 observation per file in a directory
DESCRIPTION/AUTHOR(S)
xdir is an extended version of dir, or of the extended macro function
dir. It creates an output dataset (or resultsset), with 1 observation
for each file in a user-specified directory conforming to a
user-specified pattern, and belonging to a user-specified file type,
and data on the file name and the directory name. This dataset may be
listed using the list() option and/or saved to a data frame using the
frame() option and/or saved to a file using the saving() option and/or
written to the memory using the norestore or fast option, overwriting
any existing dataset. Alternatively (or additionally), a list of the
file names may be saved in a local macro, using the local() option or
the plocal() option.
Author: Roger Newson
Distribution-Date: 02october2019
Stata-Version: 16
INSTALLATION FILES (click here to install)
xdir.ado
xdir.sthlp
----------------------------------------------------------------------------------------------
(click here to return to the previous screen)
Comment