我的R脚本被杀死而没有错误

我在自己的笔记本电脑上的RStudio中编写和测试了该R脚本,它运行正常。

PS22_compounds <- read.csv("./PS22_compounds.tsv", sep = "\t")
PS22_ECFP4 <- read.csv("./PS22_ECFP4.csv")

tenPer <- nrow(PS22_compounds) * 0.1
tenPer_num <- round(tenPer, digits = 0)
tenPer_sample <- sample(PS22_compounds$compound_chembl_id, size = tenPer_num)

df <- data.frame(matrix(ncol = 4, nrow = 0))
cols <- c("id1", "id2", "Similarity", "KS Distance")
colnames(df) <- cols

for (i in tenPer_sample) {
  sim_df <- PS22_ECFP4[PS22_ECFP4$id1 == i,]
  dist1 <- sim_df[ , 3]
  for (k in 1:nrow(sim_df)) {
    sim <- sim_df[k , 3]
    sim_r <- floor(sim * 100) / 100
    comp2 <- sim_df[k, 2]
    comp2_df <- PS22_ECFP4[PS22_ECFP4$id1==comp2,]
    dist2 <- comp2_df[ , 3]
    if (length(dist1) > 1 & length(dist2) > 1) {
      ks <- ks.test(dist1, dist2)
      df[nrow(df) + 1,] = c(i, comp2, sim_r, ks$statistic)
    }
  }
}

write.csv(df, "./Metrics.csv", row.names = FALSE)

然后,我将该脚本转移到我使用的服务器上,并尝试通过终端在850GB大文件上运行该脚本。

R CMD BATCH scriptName.r

它运行了一段时间,然后停止,输出了一个scriptName.Rout文件,该文件显示以下内容(我个人除了看到该警告之外还没有看到其他错误,该警告不足以杀死该进程)

Platform: x86_64-redhat-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

During startup - Warning message:
Setting LC_CTYPE failed, using "C"
> PS22_compounds <- read.csv("PS22_compounds.tsv", sep = "\t")
> PS22_ECFP4 <- read.csv("PS22_ECFP4.csv")

有谁对可能发生的问题有任何建议吗?顺便说一句,服务器大约有1TB RAM。