On Friday 12 September 2003 14:29, Michael Kirschbaum wrote:
> Hi Everyone.
>
> I have a simple problem but don't know, how to get along.
>
> how can I convert the vector
>
> a<-c("0,01","1,00")
> in a vector
> b<-c(0.01,1.00)
You can use as.numeric(), but you need to change the decimal delimiter
to ".", e.g.
R> as.numeric(gsub(",", ".", a))
[1] 0.01 1.00
hth,
Z
> Thank you for suggestions
>
> M.Kirschbaum
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [EMAIL PROTECTED] mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help