[R] Limit

Rui Barradas
2024-11-09T06:16:58Z

?s 00:58 de 09/11/2024, Val escreveu:
> Hi All,
>
> I am reading data file ( > 1B rows) and do some date formatting like
>        dat=fread(mydatafile)
>       dat$date1 <- as.Date(ymd(dat$date1))
>
> However, I am getting an error message saying that
>      Error: cons memory exhausted (limit reached?)
>
> The  script was working  when the number rows were  around 650M.
>
> Is there another way to  handle  a big data set in R?
>
>
> Thank you.
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
https://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Hello,

fread works but as.Date(ymd(.)) does not?
You probably don't need both date coercion functions, get rid of one of
them and try again.


dat$date1 <- ymd(dat$date1)

or

dat$date1 <- as.Date(dat$date1)


Hope this helps,

Rui Barradas


--
Este e-mail foi analisado pelo software antiv?rus AVG para verificar a presen?a
de v?rus.