PerformPSEA function form MetaboanalystR is giving error

Hi everyone I wanted to run the MS peaks to paths analysis via MetaboanalystR.
Everything works fine until I come to run the "PerformPSEA" function, here it throws an error:

Error: 'na.omit' is not an exported object from 'namespace:data.table'
In addition: Warning message:In serialize(data, node$con) :
'package:stats' may not be available when loading

I don't understand what is meant with the error? and I can also not understand the syntax by looking at the function "PerformPSEA":

function (mSetObj = NA, lib, libVersion, minLib = 3, permNum = 100)
mSetObj <- .get.mSet(mSetObj)
mSetObj <- .setup.psea.library(mSetObj, lib, libVersion,
version <- mSetObj$paramSet$version
mSetObj$dataSet$paramSet <- mSetObj$paramSet
if (mSetObj$paramSet$mumRT & version == "v2") {
mSetObj <- .init.RT.Permutations(mSetObj, permNum)
else {
mSetObj <- .init.Permutations(mSetObj, permNum)
if (class(mSetObj) != "list") {
if (mSetObj == 0) {
AddErrMsg("MS Peaks to Paths analysis failed! Likely not enough m/z to compound hits for pathway analysis!")
<bytecode: 0x00000217724a4550>
<environment: namespace:MetaboAnalystR>