Error: saving a text file as RData and import in R

I split a large text file (30 GB in size) to small 40 files in the cluster and saved it as RData. Then I am importing these small RData files to R to filter these for missing and redundant SNP markers. But it is giving an error.

Splitting large text file to small files: split -n l/40 --numeric-suffixes=1 --suffix-length=2 --additional-suffix=".RData" merge.vcf split

Then importing it to R for SNP filtering:

dfall <- NULL
for(i in 1:40){load(paste0("split_",i,".RData"))
  df <- unique(df)
  count.nas <- rowSums(
  dfall <- rbind(dfall, df)

I want to split large file to small files, save them as RData, import to R and filtering for missing and redundant markers.

I get this error in R while running the above script:
Error in readChar(con, 5L, useBytes = TRUE) : cannot open the connection In addition: Warning message: In readChar(con, 5L, useBytes = TRUE) : cannot open compressed file '/Users/gurleenkaursandhu/Desktop/5x_split_files/test/split_bwa_samtools_1.RData', probable reason 'No such file or directory'

A note about Cross-Posting, FAQ: Is it OK if I cross-post?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.