[R] insert a dot to the numbers
Henrique Dallazuanna
wwwhsd at gmail.com
Mon Dec 21 01:04:58 CET 2009
Try this also:
sapply(s, function(x)format(x, big.interval = nchar(x) - 3, big.mark = "."))
On Sun, Dec 20, 2009 at 7:50 PM, rusers.sh <rusers.sh at gmail.com> wrote:
> Hi,
> Anybody can give me some hints on the following problem?
> s<-c(1101111,112321)
> I want to insert a dot "." after the third number and get the following
> results.
> 110.1111
> 112.321
>
> Thanks a lot.
>
> --
> -----------------
> Jane Chang
> Queen's
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O
More information about the R-help
mailing list