由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - 请教SAS difficult题
相关主题
Easy SAS question, anyone can help请教SAS base 123 一题
[合集] 请教SAS 问题!SVM in R or SAS?
[合集] SAS问题求助-如何把普通变量的值传递给宏变量慕名而来,请教一个 SAS date question
问三题SAS Base的题目【求助】SAS Base 一道题
遇到一个SAS问题SAS data merge求助
How to compare two correlations in SAS?版上有统计和CS双修的大侠么?
如何计算normal distribution function的cdf numerically?请教一道SAS Adv,killtest 85
Import excel file to sas (the first 8 or more observationsSAS format 的问题
相关话题的讨论汇总
话题: newcol话题: item话题: valb话题: vala话题: tb1
进入Statistics版参与讨论
1 (共1页)
y*****i
发帖数: 3
1
Sorry I can't input Chinese with this computer...
and thank you for taking a look,
and here is my challenge:
I want to add new a numeric column 'newcol' to tb1,
and the value of newcol will be decided by item:
if item is 'A' then newcol take valA;
if item is 'B' then newcol take valB;
...
tb1 has 32 columns:
time item valA valB valC valD valE valF....valAD
t1 A 0.1 0.2 . . 0.4
t1 B . . 0.1 0.2 . . 0.4
t1 c . 0.2 0.3 . . . 0.4
.
.
.
t10
f********t
发帖数: 117
2
selct *, case when item = A then valA
when item = B then valB
..
end as newcol
from tb1
I didnt test this in sas, but it should work in sql.
1 (共1页)
进入Statistics版参与讨论
相关主题
SAS format 的问题遇到一个SAS问题
[合集] SAS的一个问题How to compare two correlations in SAS?
Help: covert SAS char date into numeric date如何计算normal distribution function的cdf numerically?
[合集] 如何用SAS把几个colume的值连接在一起Import excel file to sas (the first 8 or more observations
Easy SAS question, anyone can help请教SAS base 123 一题
[合集] 请教SAS 问题!SVM in R or SAS?
[合集] SAS问题求助-如何把普通变量的值传递给宏变量慕名而来,请教一个 SAS date question
问三题SAS Base的题目【求助】SAS Base 一道题
相关话题的讨论汇总
话题: newcol话题: item话题: valb话题: vala话题: tb1