'How do I deal with this weird error function using dcast?
I am using dcast in order to widen my data table:
df <- dcast(setDT(dt),locus ~ Indiv,value.var = 'x')
I have a data table that is 1254840 observations and 3 variables, I need to make it 3270 observations and 373 variables.
But every time I try to use the above function this error pops up:
Error in forderx(x, cols, sort=true, retgrp = false) :
Failed to alloc cradix_counts
I think it is a memory issue but I cant find a way to get it to work, I have used gc(), and memory.limit() to no avail.
Is there anything I can do to combat this error or is there another way to widen my data table?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
