I am getting an error of cannot allocate vector of size
. I searched lots of methods online including memory.limit(size=)
gc()
, and it kept getting the same error. No matter how large that I try the memory.limit(size=)
, but it still kept getting the cannot allocate vector of size 3.1Gb
. But my laptop's RAM is 16Gb, and I checked the R, the R version is 64 bit. I was trying to analyzing a huge dataset, but I can't get the result with this error.
I was trying to run the below codes:
coxph(Surv(time, survival)~treatment + tt(treatment),data=lala,
weights=ps_weight_adj,tt=function(x,t,...)x*log(t))
And my data have 195,442 more rows, and 13 more variables:most of data are dbl, and the treatment that I used in this code is chr.
I have checked the task manager, I don't think other programs take lots of memory, but no matter how many program that I closed, the error will always said that cannot allocate vector of size 3.1Gb
Could anyone help me? Thank you!