[R] creating a sequence of object names

John cyracules at yahoo.co.uk
Sun Nov 28 18:06:51 CET 2004


Hello R-users,

I wanted to generate objects named 'my.ftn1',
'my.ftn2', ... , 'my.ftn10', and tried the following
code without success. How can I do this?

> for ( i in 1:10 ) {
+ sub(" ", "", paste("my.ftn", i)) <- NULL
+ }
Error: Target of assignment expands to non-language
object
> 

Many thanks.

John




More information about the R-help mailing list