Unefficent data wrangling in R
You can do more conversion as you read the data. The magic is done by the colClasses parameter to read.delim(). That parameter allows you to (1) convert the DateTime whilst reading and (2) drop unwanted columns.
Now I don't know what your data looks like, but here's a rough outline of how to read a datetime (untested). Note that you can do the + years(98) within the data-parsing class as well.
library(methods)
setClass(&quot;myDateTime&quot;)
setAs(&quot;character&quot;,
      &quot;myDateTime&quot;,
      function(from) as.DateTime(from, format=&quot;%Y-%m-%d %H:%M:%S&quot;, tz=Sys.timezone())) + years(98)

d = read.delim(..., colClasses = c(..., &quot;myDateTime&quot;, ...))

For the columns you want to drop, code them as &quot;NULL&quot; (note the quotes).
d = read.delim(..., colClasses = c(&quot;numeric&quot;, &quot;myDateTime&quot;, &quot;NULL&quot;, ...))

This not only shortens your code, but by explicitly telling read.delim() the datatype of each column the read is 2x faster. And of course there aren't two copies of the data in memory after the parsing.
You might also want to look at the skip= and col.names=c() parameters as they allow you to decide the names of the variables, rather than having those decided by the input file. If you decide to use colCLasses=c() you'll almost certainly want to skip the column headings rather than program a class which reads strings for row 1 and a different datatype for the remaining rows.
BTW, if you have to do complex manipulation of input data, then the tidyverse's readr and dplyr libraries have useful improvement over the shipped R libraries. Regardless of your use or not of Tidyverse, its book is worth reading if you are an R programmer: https://r4ds.had.co.nz/