krista,
The xcmsSet method takes files as the first input. You don't' need to load the file into a xcmsRaw structure first. You want to be running centWave in the following way:
xs<-xcmsSet(method="centWave")
If getwd() reports the directory with your files. Otherwise you can change your directory to where you need to be with R using the file menu. If you need to specify which files you need then use something like the following:
files<-list.files(pattern="mzData", recursive=TRUE, ignore.case=TRUE)
files
xs<-xcmsSet(files, method="centWave")
You can change pattern to be anything you need just include the mzData/mzXML/cdf ending.
If you only have one file then you can use the xcmsRaw method and findPeaks separately:
xr<-xcmsRaw(file, profstep=0
peaks<-findPeaks.centWave(xr, snthresh = 10,ppm=3,prefilter = c(3,150),peakwidth=c(5,60),mzCenterFun="wMean",integrate = 1,fitgauss= TRUE,noise = 100)
head(peaks)