日志管理(二): title_创设标题与环境变量记录 |
问题:如何在log文件中创设标题
Stata程序:title 该命令通过星号描绘文本框,并在中间位置处添加标题,时间日期在右下角注明。
title 文本(自定义) , [ ss ll xl xxln(integer) b(integer) ] [ ]为可选项, ss 小号标题 ll 大号标题 xl 加大号标题 xxl 特大号标题 n()星号行数(自定义) bl()文本框上边距(自定义)
|
-
- ssc install title
-
- title "SPSS R Stata EViews Matlab"
-
- title "SPSS" "R" "Stata" "EViews" "Matlab"
复制代码- title ///
- "Thirty graphical tips Stata users should know" ///
- "Nicholas J. Cox" ///
- " Department of Geography, Durham University" ///
- "n.j.cox@durham.ac.uk"
复制代码
Jan Brogger,jan.brogger@med.uib.no
附: - #delimit ;
- di _n(3) in wh
- "___________________ tm" _n
- " /__ / ____/ / ____/" _n
- "___/ / /___/ / /___/ Population Pyramids and reshape" _n
- "----------------------------------------------------" _n(2) ;
复制代码- #delimit ;
- title
- "___________________ "
- " /__ / ____/ / ____/"
- "___/ / /___/ / /___/ "
- ;
复制代码
- local date `c(current_date)'
- local time `c(current_time)'
- local vers `c(stata_version)'
- local mem `c(memory)'
- local flav=cond(`c(MP)',"MP",cond(`c(SE)',"SE","IC"))
- local cwd `c(pwd)'
- display _newline "Run`date'at `time' on Stata/`flav' version `vers',memory=`mem' bytes"
- display _newline "Current working directory:`cwd'"
复制代码 可以将以上代码片段放入do文档中,即可在运行后日志中出现内存、版本、时间日期、工作目录等信息。
|
- sysuse auto,clear
- display _newline "Datafile:`c(filename)'(N=`c(N)',k=`c(k)') as of `c(filedate)'"
复制代码 |
|