# GFF file too big to load into R

I want to load a GFF (annotation) file into an R data frame in order to extract some information from it, e.g. the location of transposons in the genome.

I used the following code:

library(rtracklayer)
gff <- rtracklayer::import('c_elegans.PRJNA13758.WS263.annotations.gff3.gz')
Error: cannot allocate vector of size 210.2 Mb


It seems that the GFF3 file is too big for loading into R. Do you know if this is limited by R or by my computer's memory?

I ran this on a GNU/Linux computer.

Under Windows you can increase the available RAM in R with memory limit:

> memory.limit()
[1] 8070
> memory.limit(size=10000)
[1] 10000
> memory.limit()
[1] 10000


But that is not necessary on linux/unix.

• This only works (and is only required) on Windows. OP is using Linux. Not sure why he accepted this answer. May 20 '18 at 12:39
• Indeed, memory.limit() [1] Inf Warning message: 'memory.limit()' is Windows-specific. I understood this as 'no memory limit' on Linux, so only limited by available RAM? May 21 '18 at 0:17