s*******2 发帖数: 791 | 1 我通常的做法是run “proc content data=dataset”,然后从output里读取
observation number,再手动赋值给一个variable “obscounter”.
有没有一个方程可以直接读取SAS Dateset的observation number并赋值给一个
variable?
大家都用什么方法读取SAS Dateset的observation number,除过用“proc content
data=dataset”?
谢谢。 |
|
g****8 发帖数: 2828 | 2 如果做N次循环,每次得出的estimate 要放到一个新的dateset的第N行里面去。
建那个新的dateset的时候,如何设置dateset呢?好像不能空着,如果直接写N行0,又
太不效率了。
谢谢。 |
|
e*******8 发帖数: 94 | 3 这种问题太高级了吧。。。我记得mining massive datesets里面讲LSH里很简略的讲了
个fingerprint matching的例子 |
|
s*******1 发帖数: 146 | 4 I want to creat a dataset B from dateset A. How can I do it?
dataset A:
ID NUM
A 2
B 3
C 3
dataset B:
ID NUM
A 1
A 1
B 1
B 1
B 1
C 1
C 1
C 1
Thanks. |
|
A*******s 发帖数: 3942 | 5 data test;
set xxxx;
obs=_n_;
run; |
|
s*******2 发帖数: 791 | 6 对欧,谢谢你给我提供这个思路。:)
我在set statement加上end option,另外加了一个macro var就得到了我想要得obs number.
data _null_;
set dataset end=last;
if last then call symputx('rfcount',_n_);
run;
%put &rfcount;
大家还有什么方法吗?
有没有一个function可以直接用的? |
|
s*r 发帖数: 2757 | 7 proc sql; select count(*) into :obs from tablex; quit;
the syntax might be wrong |
|
s*******2 发帖数: 791 | 8 sir, 你说的谁的syntax可能是错误的? 我不太用sql,我要在研究一下你的这个方法
。谢谢了。 |
|
c*******o 发帖数: 8869 | 9 this just create a macro variable. a more direct approach is to create a
column in table directly....
proc sql noprint;
create table new as
select *, count(*) as obs_count from old;
quit; |
|
s*r 发帖数: 2757 | 10 my syntax might be wrong
i do not where to put the : |
|
b******e 发帖数: 539 | 11 你是要observation number还是要count? |
|
s*******2 发帖数: 791 | 12 observation number? OR count?在我认为他们是一样的东西。babyface可不可以给我
解释一下他们的不同呢?谢谢你。
我想要的就是怎么得到一个Dataset的observation总数 (或者说这个Dataset的total
row number). |
|
D******n 发帖数: 2836 | 13 这是英语问题
number 就是通常的no,是指具体标号,no1,no1000
count是指一共有多少number,也就是有多少obs
你混着用,所以大家被你搞糊涂了,譬如total row number。。。。
period
total |
|
S******y 发帖数: 1123 | 14 data _null_;
if 0 then set test nobs=nobs;
call symputx(”nobs”,nobs);
stop;
run; |
|
c*********n 发帖数: 87 | 15 proc sql;
select count(*)
from yourdataset; |
|
|
s********p 发帖数: 637 | 17 SAS has its smart way to deal with Cartesian product. But I don't believe Cartesian join is a completely memory operation. If so, why people bother to use hash for large datesets?
btw, you new 头像 is MUCH better though very fat! |
|
g**a 发帖数: 2129 | 18 sure. If you have access to cluster, you can set up the dateset and R codes
for parallel computing |
|
c*****1 发帖数: 131 | 19 what I want to do is:
data temp;
set big;
keep A B C D some_other_vars ...;
run;
%do_the_magic;
data &out;
set &data;
keep A B C D;
.....
run;
%mend;
%do_the_magic(data=big,out=small);
In my opinion, if your macro is given to others to use and you do not expect
time-costing I/O operations caused by huge datasets, simplicity and
readable is much important than the efficiency. 1) does not save much time on small/mid-sized datasets. Also, if the dateset is really huge,... 阅读全帖 |
|
n*****3 发帖数: 1584 | 20 yes, R make copies of The dateset when doing the
analysis, and temp transfer matrix.....
just like the other languages, it needs much
large rooms...
R is way too LISP alike, no external mem algorithm..
what a shame.. |
|
n*****3 发帖数: 1584 | 21 yes, R make copies of The dateset when doing the
analysis, and temp transfer matrix.....
just like the other languages, it needs much
large rooms...
R is way too LISP alike, no external mem algorithm..
what a shame.. |
|
S*x 发帖数: 705 | 22 PCA
or
Proc varclus
on the 2nd dateset
Use the selected (new) variables from 2nd dataset, build model on first
dataset |
|