UPD: replaced merge to inner_join, new error:
Error in UseMethod("tbl_vars") :
  no applicable method for 'tbl_vars' applied to an object of class "function"
Calls: inner_join ... tbl_vars -> new_sel_vars -> structure -> tbl_vars_dispatch
I am trying to run my R-script from command line, but it is return error:
Error in if (nx >= 2^31 || ny >= 2^31) stop("long vectors are not supported") :
  missing value where TRUE/FALSE needed
Calls: merge -> merge.data.frame
Execution halted
What it's mean?
Where are no one problems, when I run similar code from R or Rstudio. How can I fix this issue?
Part of R-script
clonotypes_tables = function(name, cell, mode){
  sub = subset(metadata, metadata$donor == as.character(name))
  sub =  subset(sub, sub$cell_type == as.character(cell))
  if (nrow(sub) > 1){
    sub = sub[order(sub$time_point), ]
  
    if (file.exists(paste(getwd(), sub$file_name[1], sep="/")) & file.exists(paste(getwd(), sub$file_name[2], sep="/"))){
      point1 = read.table(sub$file_name[1], header = T)
      #cat("check1")
      point2 = read.table(sub$file_name[2], header = T)
      
    
      if (nrow(point1) >= 1000 & nrow(point2) >= 1000){
        #common.clonotype = merge(point1[1:1000,], point2[1:1000,], by = c("cdr3aa", "v"))
        if (mode == "CDR3_V"){
          common.clonotype = merge(point1, point2, by = c("cdr3aa", "v"))
          common.clonotype$clon = paste(common.clonotype$cdr3aa, common.clonotype$v, sep = "~")
        }
        else{
          common.clonotype = merge(point1, point2, by = c("cdr3aa"))
          common.clonotype$clon = common.clonotype$cdr3aa
        }
        common.clonotype = common.clonotype[,c("clon", "freq.x", "freq.y")]
        colnames(common.clonotype) = c("Clonotypes", "0.5", "1")
        dim(common.clonotype)
        common.clonotype = common.clonotype[order(common.clonotype[2], decreasing = T), ]
        common.clonotype
      }
      #return(common.clonotype)
    }
  else{
    print(paste(name, cell, "hasn't two time points", sep = " ")) 
   }
  }
}
 
    