Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • new version of addinby (again) on SSC

    Thanks once again to Kit Baum, a new version of the addinby package (superseding last week's version) 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 addinby.

    The addinby package is described as below on my website. The new version fixes a bug in the sortpreserve option of the fraddinby module, which caused it to fail uninformatively when adding in from large data frames.

    Best wishes

    Roger

    -----------------------------------------------------------------------------------------------------------------------------------------------------------
    package addinby from https://www.rogernewsonresources.org.uk/stata16
    -----------------------------------------------------------------------------------------------------------------------------------------------------------

    TITLE
    addinby: Add in data from a disk or frame dataset using a foreign key

    DESCRIPTION/AUTHOR(S)
    addinby is a "cleaner" alternative version of merge m:1, designed to
    reduce the lines of code in Stata do-files. It adds variables and/or
    values to existing observations in the dataset currently in memory
    (the master dataset) from a Stata-format dataset stored in the file
    filename (the using dataset), using a foreign key of variables
    specified by the keyvarlist to identify observations in the using
    dataset. These foreign key variables must identify observations in
    the using dataset uniquely. Unlike merge m:1, addinby always
    preserves the observations in the master dataset in their original
    sorting order, and never adds any additional observations, and only
    generates a matching information variable if requested to do so.
    However, addinby may optionally check that there are no unmatched
    observations in the master dataset, and/or check that there are no
    missing values in the foreign key variables in the master dataset.
    fraddinby is similar to addinby, but it adds variables from a dataset
    in a data frame, instead of from a dataset in a disk file.

    Author: Roger Newson
    Distribution-Date: 26april2026
    Stata-Version: 16

    INSTALLATION FILES (click here to install)
    addinby.ado
    fraddinby.ado
    addinby.sthlp
    fraddinby.sthlp
    -----------------------------------------------------------------------------------------------------------------------------------------------------------
    (click here to return to the previous screen)



  • #2
    Thanks Roger Newson. FYI, which addinby shows the date as 13 Apr 2020, even after installing the latest update. Users may find this confusing.

    Code:
    . ssc install addinby, replace
    checking addinby consistency and verifying not already installed...
    all files already exist and are up to date.
    
    . which addinby
    c:\ado\plus\a\addinby.ado
    *! Author: Roger Newson
    *! Date: 13 April 2020
    --
    Bruce Weaver
    Email: [email protected]
    Version: Stata/MP 19.5 (Windows)

    Comment

    Working...
    X