全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
10425 17
2012-07-15
请问如何实现变量首字母大写?只要首字母是大写的,别的都是原样,谢谢!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2012-7-15 16:28:12
rename _all,proper
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-7-15 16:49:24
斑竹这么简单的一条语句就搞定了!!! 我写个程序弄了半天才弄好。。。。。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2013-3-8 17:37:57
蓝色 发表于 2012-7-15 16:28
rename _all,proper
蓝斑竹,这条语句执行不了哇
麻烦斑竹看一眼~   谢谢! 1.JPG



二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2013-3-9 01:16:38
. clear

. sysuse auto
(1978 Automobile Data)

. des

Contains data from D:\ProgramFiles\StataSE12\ado\base/a/auto.dta
  obs:            74                          1978 Automobile Data
vars:            12                          13 Apr 2011 17:45
size:         3,182                          (_dta has notes)
--------------------------------------------------------------------------------------------------------------
              storage  display     value
variable name   type   format      label      variable label
--------------------------------------------------------------------------------------------------------------
make            str18  %-18s                  Make and Model
price           int    %8.0gc                 Price
mpg             int    %8.0g                  Mileage (mpg)
rep78           int    %8.0g                  Repair Record 1978
headroom        float  %6.1f                  Headroom (in.)
trunk           int    %8.0g                  Trunk space (cu. ft.)
weight          int    %8.0gc                 Weight (lbs.)
length          int    %8.0g                  Length (in.)
turn            int    %8.0g                  Turn Circle (ft.)
displacement    int    %8.0g                  Displacement (cu. in.)
gear_ratio      float  %6.2f                  Gear Ratio
foreign         byte   %8.0g       origin     Car type
--------------------------------------------------------------------------------------------------------------
Sorted by:  foreign

. rename _all,proper

. des

Contains data from D:\ProgramFiles\StataSE12\ado\base/a/auto.dta
  obs:            74                          1978 Automobile Data
vars:            12                          13 Apr 2011 17:45
size:         3,182                          (_dta has notes)
--------------------------------------------------------------------------------------------------------------
              storage  display     value
variable name   type   format      label      variable label
--------------------------------------------------------------------------------------------------------------
Make            str18  %-18s                  Make and Model
Price           int    %8.0gc                 Price
Mpg             int    %8.0g                  Mileage (mpg)
Rep78           int    %8.0g                  Repair Record 1978
Headroom        float  %6.1f                  Headroom (in.)
Trunk           int    %8.0g                  Trunk space (cu. ft.)
Weight          int    %8.0gc                 Weight (lbs.)
Length          int    %8.0g                  Length (in.)
Turn            int    %8.0g                  Turn Circle (ft.)
Displacement    int    %8.0g                  Displacement (cu. in.)
Gear_Ratio      float  %6.2f                  Gear Ratio
Foreign         byte   %8.0g       origin     Car type
--------------------------------------------------------------------------------------------------------------
Sorted by:  Foreign
     Note:  dataset has changed since last saved


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2013-3-9 01:17:52
没有问题啊
你看我上面的例子

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群