Download src/test.R from Myxogastria0808/loadings-web-api-sample: direct link, hf CLI and curl.
- Browser
- Download file 384 Bytes
-
https://huggingface.co/spaces/Myxogastria0808/loadings-web-api-sample/resolve/main/src/test.R
- Command line
-
hf download hf://spaces/Myxogastria0808/loadings-web-api-sample/src/test.R
-
curl -L -o test.R https://huggingface.co/spaces/Myxogastria0808/loadings-web-api-sample/resolve/main/src/test.R
384 Bytes
| library("loadings") # ロード | |
| data(fasting) # テストデータ読み込み | |
| pca <- prcomp(fasting$X, scale=TRUE) # 主成分分析 | |
| pca <- pca_loading(pca) # 主成分分析の因子負荷量の検定 | |
| current_path <- getwd() | |
| setwd(paste(current_path, "/data", sep="")) | |
| paste("png file output path: ", getwd(), sep="") | |
| png("test.png", width=800, height=800) | |
| biplot(pca) | |
| dev.off() | |