[R] Passing colnames to graphics title

Jan T. Kim jtk at cmp.uea.ac.uk
Wed Feb 16 17:57:05 CET 2005


On Wed, Feb 16, 2005 at 02:46:51PM +0000, Laura Quinn wrote:
> Obviously I have been trying to use the colnames() function!
> 
> However, when I try to subscript ie:
> 
> for(i in 1:20){
> main=paste("Site:",colnames(i),sep="")
                     ^^^^^^^^^^^

it looks to me that this should be something like

    colnames(foo)[i]

where foo is the matrix or data.frame you use.

Best regards, Jan
-- 
 +- Jan T. Kim -------------------------------------------------------+
 |    *NEW*    email: jtk at cmp.uea.ac.uk                               |
 |    *NEW*    WWW:   http://www.cmp.uea.ac.uk/people/jtk             |
 *-----=<  hierarchical systems are for files, not for humans  >=-----*




More information about the R-help mailing list