由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - How to concatenate these two varaibles in SAS: name||Birt
相关主题
[合集] 愿意提供关于R的帮助怎么演化成这样了呢?
[合集] 请问如何看到R的source code?再写一个找工作的经历
SAS Help! How to read variables with sepcial character.[求助]Base SAS123 几道题39,72,73,75,76,79,93
请教一个关与SAS data的问题也贡献一个电面经验
help, got laid off请问从sas programer转到statistician容易么?
请问SPSS 或者 SAS中变量名的变换 AABB - BBAA用SAS merge Excel cells ?
R question[合集] 如何DETECT empty file in R?
咣,咣,咣,上书了!Quick R guide.[合集] SAS如何读入含有具体时间的excel文件?
相关话题的讨论汇总
话题: sas话题: name话题: birthday话题: two
进入Statistics版参与讨论
1 (共1页)
l****g
发帖数: 304
1
For example:
value of name: zhang
value of Birthday: 090225 (format as yymmdd6.)
New value for the new variable: zhang090225; for the new variable, the birthday keeps yymmdd format(two digits year, two digits month, two digits day).
Thank you!
s*****n
发帖数: 2174
2
you need to specify:
1. what is your input file like
2. what platform do you want to use
3. what output format do you want.

keeps

【在 l****g 的大作中提到】
: For example:
: value of name: zhang
: value of Birthday: 090225 (format as yymmdd6.)
: New value for the new variable: zhang090225; for the new variable, the birthday keeps yymmdd format(two digits year, two digits month, two digits day).
: Thank you!

l****g
发帖数: 304
3
Thank you, SongKun.
1. what is your input file like
Sas data file with:
Birthday format as yymmdd6.
Name format as $20.
2. what platform do you want to use
Windows?
3. what output format do you want.
I want to create another character variable which concatenate variable name
and variable Birthday.
The example:
name: zhang
Birthday: 090225
I want to create a new value: zhang090225 based on the name and birthday of
that record.
s*****n
发帖数: 2174
4
I don't know much about SAS.
Wait for SAS people to answer.

name

【在 l****g 的大作中提到】
: Thank you, SongKun.
: 1. what is your input file like
: Sas data file with:
: Birthday format as yymmdd6.
: Name format as $20.
: 2. what platform do you want to use
: Windows?
: 3. what output format do you want.
: I want to create another character variable which concatenate variable name
: and variable Birthday.

l****g
发帖数: 304
5
Thank you for clairyong what I am asking, Songkun.
q**j
发帖数: 10612
6
try this, it may or may not work:
compress(name||input(put(birthday,YYMMDD6.),$6.))
if II does not work cats() might do.
l****g
发帖数: 304
7
Thank you, QQZJ, it works!!
If I ingore the input funcion here as:
compress(name||put(birthday,YYMMDD6.)), it works also.
Thanks again!
y****1
发帖数: 400
8
Right, coz the compress function removes spaces by default.

【在 l****g 的大作中提到】
: Thank you, QQZJ, it works!!
: If I ingore the input funcion here as:
: compress(name||put(birthday,YYMMDD6.)), it works also.
: Thanks again!

q**j
发帖数: 10612
9
good to know. i am kind of surprised. learned sth new too.

【在 l****g 的大作中提到】
: Thank you, QQZJ, it works!!
: If I ingore the input funcion here as:
: compress(name||put(birthday,YYMMDD6.)), it works also.
: Thanks again!

1 (共1页)
进入Statistics版参与讨论
相关主题
[合集] SAS如何读入含有具体时间的excel文件?help, got laid off
[合集] SAS 问题:如何在使用macro的时候保护data。请问SPSS 或者 SAS中变量名的变换 AABB - BBAA
[合集] 请问如何可以像run SAS, R一样的run python?R question
再问一个SAS技术问题。。。咣,咣,咣,上书了!Quick R guide.
[合集] 愿意提供关于R的帮助怎么演化成这样了呢?
[合集] 请问如何看到R的source code?再写一个找工作的经历
SAS Help! How to read variables with sepcial character.[求助]Base SAS123 几道题39,72,73,75,76,79,93
请教一个关与SAS data的问题也贡献一个电面经验
相关话题的讨论汇总
话题: sas话题: name话题: birthday话题: two