#### azalea

##### New Member
Is there a was to run ].data.frame instead of ].data.table when using package data.table? I ask because I get error "Error: cannot allocate vector of size 1.1 Mb" when running the below line of code on very large data and using ].data.table:
dat2 = rowsum(dat[,cols,with=F], dat$id) ...but know that the equivalent code with ].data.frame doesn't get errors: dat2 = rowsum(dat[,cols_n], dat$id)

Note: I really only read in the data.table package because I'm using it's handy fread function.

#### Dason

Why not just convert your data to a data.frame using as.data.frame.

#### azalea

##### New Member
I have tried both:
dat2 = rowsum(as.data.frame(dat[,cols,with=F]), dat$id) and: dat2 = as.data.frame(rowsum(dat[,cols,with=F], dat$id))
and I'm still getting the same error, I think because it's still using ].data.table instead of ].data.frame.

#### Dason

dat <- as.data.frame(dat)