SAS多个数据集逻辑顺序

发布于 2025-01-29 10:47:22 字数 234 浏览 1 评论 0原文

很抱歉问这个问题,但是我的英语很差,我不知道在Google上输入什么以获得结果。

我想做:

data test;
set mytable1 to mytable999;
run;

我该如何告诉SAS将所有桌子从1到999设置在不编写的情况下(因为很长时间这样做)。像mytable1-999这样的东西

非常感谢,我知道这是一个基本功能,但我不记得英语的名字是什么

I'm sorry to ask this question but my English is poor and I don't know what to type on google to get results.

I want to do :

data test;
set mytable1 to mytable999;
run;

how can I tell SAS to set all the tables from 1 to 999 without writing them (cause it's long to do so). something like mytable1-999

thank you very much, I know it's a basic function but I don't remember what is the name in English

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

堇色安年 2025-02-05 10:47:22

只需在SAS中使用“:”的通牌函数。在

data myTable1;
    do i = 1 to 3;
        j = 2*i;
        output;
    end;
run;
data myTable2;
    do i = 1 to 3;
        j = -i;
        output;
    end;
run;
data myAll;
    set myTable:;
run;

mytable中:等效于所有表的列表,其名称以mytable开头。

结果就是

i   j
==  ==
1   2
2   4
3   6
1   -1
2   -2
3   -3

Just use the wild-card function of ´:´ in SAS. In

data myTable1;
    do i = 1 to 3;
        j = 2*i;
        output;
    end;
run;
data myTable2;
    do i = 1 to 3;
        j = -i;
        output;
    end;
run;
data myAll;
    set myTable:;
run;

myTable: is equivalent with the list of all tables of which the name starts with myTable.

The result is

i   j
==  ==
1   2
2   4
3   6
1   -1
2   -2
3   -3
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文