Error in Metaboanalyst R for raw file processing

I am trying to do raw spectral processing, but it shows me follwing error…

datapath <-“~/R/Metabolomics_Pipeline/Centroided_Earlytimepoints_B1/Positive/QC”
DataFiles ← list.files(datapath, full.names = TRUE )
mSet ← PerformROIExtraction(datapath = DataFiles, rt.idx = 0.9,plot = TRUE, rmConts = TRUE)
Error in if (!dir.exists(datapath)) { : the condition has length >

Has anyone faced the same and got a solution ? , Thanks in advance !

Dear Sir/Madam,
Thank you so much for creating this platform to solve the errors related to metaboAnalyst software.
I am facing a problem related to R syntax to do pathway , enrichment and network analysis. The issues are looks like this:

Could you help me please to solve this issue?
Kind regards
Mulugeta