Importing Data from Multiple Files

> ds = datastore(filename,"Delimiter","-,"TextscanFormats","%D%C%f","SelectedVariableNames",var)
dsReference to a collection of data.
filenameFile location.
"Delimiter","-"Delimiter is one or more characters that separate data values in the file.
"TextscanFormats","%D%C%f"Import variables using the output class in the format specification string.
"SelectedVariableNames",varImport only the variables listed in var.

Merging Data

Once you read in multiple tables, you may want to join them together. You can join two tables in many ways. The various join functions are listed in the table below.

FunctionExample
join

Key1 in Tright must have unique values and contain every key in Tleft.
innerjoin
outerjoin

Two key variables are created.
outerjoin with "MergeKeys" on