You can try the package mzR to read in the mass spec data. Depending on the CDF file format, this may be the best way.
Other possibilities to read in netCDF files are the packages rhdf5 or ncdf.
It might help if you convert your CDF with ProteoWizard to mzXML in centroided mode: https://xcmsonline.scripps.edu/docs/fileformats.html
then use mzR