[R] dynamic object names?

Duncan Murdoch murdoch at stats.uwo.ca
Mon Sep 19 14:09:18 CEST 2005


John Charles Considine wrote:
> On Mon, 2005-09-19 at 11:38 +0200, Uwe Ligges wrote:
> 
>>samir at guidi.ch wrote:
>>
>>
>>>I am trying to extract data from a matrix. Let's say that i am interested in
>>>extracting 
>>>rows from a 4x4 matrix. Instead of giving a fix name to these 4 rows I would
>>>like to add a number to prefix. As result I should get 4 objects named: 
>>>
>>>prefix_1 
>>>prefix_2 
>>>prefix_3
>>>prefix_4
> 
> Samir,
> In addition to the other comments, part of the problem may be that you
> can't assign the character '_' to standard objects.  Could you use '.'
> instead?

Actually underscores have been allowed in names since version 1.9.0.

Duncan Murdoch




More information about the R-help mailing list