Sweave answers the parameter prefix.stringfor numbers. For instance. in one recent document i'm using
\SweaveOpts{engine=R,eps=FALSE,echo=TRUE,prefix.string=figures/chart}
which leads to files figures/chart-chunkname.pdfwhere I use chunknameas identifier in the Sweave code snippet. I suspect R2HTML might help the same , but I have not tried this driver.