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; | |
submit/R; | |
airquality; | |
endsubmit; | |
run ImportDataSetFromR("work.air","airquality"); | |
quit; | |
proc print data=air(obs=30); /*データの確認(変数名など)*/ | |
run; |
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
# coding:utf-8 | |
import matplotlib.pyplot as plt | |
from wordcloud import WordCloud | |
from bs4 import BeautifulSoup | |
import requests | |
import MeCab as mc | |
def mecab_analysis(text): | |
t = mc.Tagger("-Ochasen") |
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; | |
submit/R; | |
attitude; | |
endsubmit; | |
run ImportDataSetFromR("work.attitude","attitude"); | |
use attitude; | |
read all into M; /*attitudeを行列化*/ | |
L = nrow(M); /*Mの行数*/ |
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 ベクトル */ | |
y = {8,7,6,5,6}; /* 5 × 1 ベクトル */ | |
z = {A A A B B B}; /* 1 × 6 ベクトル */ | |
create DATA1 var {x y z}; /* データセットを作る */ | |
append; /* データをベクトルの中に入れる */ | |
close DATA1; /* データセットを閉じる */ | |
quit; |
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; /* データセットを閉じる */ |
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; /* データセットを閉じる */ |
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 datasets lib=work kill memtype=data; | |
run; |
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 datasets lib=work memtype=data; | |
delete Ds1; | |
run; |
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 datasets lib=work memtype=data; | |
save Ds1; | |
run; |
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
****(1). Data exploration of iris flower data set****; | |
data iris; | |
set sashelp.iris; | |
run; | |
proc contents data=iris position; | |
run; | |
proc princomp data=iris out=iris_pca; | |
var Sepal: Petal:; |