I assume that in this case life with the package knitrwill be easier. You can read a.Ras a fragment label-aand write it to c.Rnw:
<<read-code>>=
read_chunk('a.R', labels = 'label-a')
@
<<label-a>>
@
c.Rnw library(knitr); knit('c.Rnw'), a.R ( label-a). knitr.
\SweaveInput{} R; Rnw.