日本語設定のときに使うコマンド
# 設定ファイルの場所確認
matplotlib.matplotlib_fname()
#> C:\Users\daisuke.oda\AppData\Local\Continuum\Anaconda3\lib\site-packages\matplotlib\mpl-data\matplotlibrc
# システムフォントファイル一覧
library(tidyverse) | |
library(ggrepel) | |
#------------------------- | |
# データ作成 | |
#------------------------- | |
# 円のインデックスとrを指定(r^2が中心からのユークリッド距離) | |
dist.vec <- c(user1=1, user2=2, user3=3, user4=4) | |
idx.vec <- names(dist.vec) |
# set function with which convert data into named vector | |
col.type.f <- c(vane=as.factor, | |
prefecture=as.factor, | |
date=as.Date, | |
time=as.factor, | |
ts=as.POSIXct) | |
# convert data type | |
for (col in names(col.type.f)) { | |
f.conv <- col.type.f[col][[1]] |
# sample of checking package installed and load all. | |
required.pckg <- | |
c( | |
'dummies', | |
'tidyverse', | |
'glmnet' | |
) | |
not.installed <- !(required.pckg %in% installed.packages()[,'Package']) | |
if (any(not.installed)) { |