Created
February 6, 2016 11:42
-
-
Save ymattu/92bcaa12826fd54ceec7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
proc iml; | |
x = {1,0,3,2,0,3}; /* 6 × 1 ベクトル */ | |
A = J(6,1,1); /* 6 × 1ですべての要素が1の行列 */ | |
reg_data = A || x; /* Aとxを横に連結 */ | |
create DATA2 var {A x}; /* データセットを作る */ | |
append from reg_data; /* どの行列からデータを作るか */ | |
close DATA2; /* データセットを閉じる */ | |
quit; | |
proc print data=DATA2; | |
run; | |
/**ここまではさっきと同じ**/ | |
proc iml; | |
use DATA2; | |
read all; | |
B = A + x; | |
print B; | |
quit; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment