Here's why you're having trouble. The manual linked by venu is not a good write up at all. The author failed to mention that
getSampleFiles is actually a command that comes with the ChIPSeeker package to load up sample files.
What you need to do is load up bed files of your called peaks (.narrowPeak output from MACS2 is a special type of BED), into R-compatible GRanges object.
Here's a thread where one answer recommends the use of the package
rtracklayer for this purpose. Also read this blogpost for a more insight on how special types of BED files can be massaged to be
Hope this helps.