[R] pdf filenames in while loop

Barry Rowlingson
Wed, 20 Aug 2008 11:34:07 -0000

2008/8/20 Wesley Roberts <wroberts at csir.co.za>:
> Dear R users,

> pdf(file="as.character(paste(f.mat[a])).pdf")

Whoa! Why the quotes? And why the as.character? Just paste:

 pdf(file=paste(f.mat[a],".pdf",sep=""))

 should do it. It looks like you were trying to create a file called
"as.character(...etc".

Barry