Stata 15 help for mf_cat

[M-5] cat() -- Load file into string matrix

Syntax

string colvector cat(string scalar filename [, real scalar line1 [, real scalar line2]])

Description

cat(filename) returns a column vector containing the lines from text file filename.

cat(filename, line1) returns a column vector containing the lines from text file filename starting with line number line1.

cat(filename, line1, line2) returns a column vector containing the lines from text file filename starting with line number line1 and ending with line number line2.

Remarks

cat(filename) removes new-line characters at the end of lines.

Conformability

cat(filename, line1, line2): filename: 1 x 1 line1: 1 x 1 (optional) line2: 1 x 1 (optional) result: r x 1, r>=0

Diagnostics

cat(filename) aborts with error if filename does not exist.

cat() returns a 0 x 1 result if filename contains 0 bytes.

Source code

cat.mata


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