> I'm trying to use the regexpr function to locate the decimal in a character
> string.  Regardless of the position of the decimal, the function returns 1.

You need to escape it.

> gsub("\\.",",","Female.Alabama")
[1] "Female,Alabama"

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to