[R] Strange Expression

Duncan Murdoch murdoch at stats.uwo.ca
Fri Mar 3 13:39:11 CET 2006


On 3/3/2006 7:09 AM, A Mani wrote:
> Hello,
>          I have a dataframe with a column 'col' of expressions of the form
> 2*3+4*5+6*7 and substrings thereof.

Stored in what form?  It sounds from below that they may be character 
vectors or factors.  It would be easier to help if you gave a 
reproducible example.

Duncan Murdoch

> Now
>> eval(2*3+4*5+6*7) is ok.
> But I want it done on that column... nothing seems to work
> Even
>> cil <- dataframe$col
>> eval(cil[1])
> 2*3+4*5+6*7
> 
> I want the elements of the column evaluated.
> 
> Thanks,
> 
> A. Mani
> Member, Cal. Math. Soc
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html




More information about the R-help mailing list