I tried with the Xcms package but I can only align the common peaks and I need to align all of them. Is there any way to do it with the Xcms or with another package?
The most updated and popular one would be eRah from Oscar Yane's group for GC-MS spectral alignment using R:
eRah: A Computational Tool Integrating Spectral Deconvolution and Alignment with Quantification and Identification of Metabolites in GC/MS-Based Metabolomics : Article ERah: A Computational Tool Integrating Spectral Deconvolutio...
and the tool: http://CRAN.R-project.org/package=erah.