Skip to content
Prev 29654 / 63424 Next

string comparison

It is not safe to rely on pointer comparisons until R 2.8.0.  Currently it 
is easy to get CHARSXPs that are not in the cache: it is not impossible in 
2.8.0, but you have to know how to 'break and enter'.

In your code you are comparing a CHARSXP and a SYMSXP.  You want to 
use charChance = mkChar("chance") and then make it precious 
(R_PreciousObject).
On Thu, 7 Aug 2008, Kjell Konis wrote: