CentOS v.6.2를 사용하여 IBM IDataplex 클러스터에 액세스할 수 있습니다. R에서 다음 R 스크립트를 실행하려면:
library(data.table) library(mgcv) library(reshape2) library(dplyr)
library(tidyr) library(lubridate) library(DataCombine)
temp_hist <- as.data.table(temp_hist)
humid_hist <- as.data.table(humid_hist)
# Merge
mykey<- c("FIPS", "year","month", "week")
setkeyv(temp_hist, mykey)
setkeyv(humid_hist, mykey)
hist<- merge(temp_hist, humid_hist, by=mykey)
# Min
hist_min <- hist
hist_min$FIPS <- hist_min$year <- hist_min$month <- hist_min$tmax <- hist_min$tmean <- hist_min$hmax <- hist_min$hmean <- NULL
# Adding Factors
hist_min$citycode <- rep(101,nrow(hist_min))
hist_min$year <- rep(2010,nrow(hist_min))
hist_min$week <- rep(1,nrow(hist_min))
hist_min$lnincome <- rep(10.262,nrow(hist_min))
# Predictions
pred_hist_min <- predict.gam(gam_mean_count_wk, hist_min)
pred_hist_min <- as.data.table(pred_hist_min)
pred_hist_min <- cbind(hist, pred_hist_min)
pred_hist_min$tmax <- pred_hist_min$tmean <- pred_hist_min$tmin <- pred_hist_min$hmax <- pred_hist_min$hmean <- pred_hist_min$hmin <- NULL
# Aggregate by FIPS
min_hist <- pred_hist_min %>%
group_by(FIPS) %>%
summarise(pred_hist = mean(pred_hist_min))
이 스크립트를 실행하기 위해 qsub/bsub를 사용하여 클러스터 성능(코어 지정)을 활용하려면 어떻게 해야 합니까?