Displaying 1 result from an estimated 1 matches for "formateng2r".
Did you mean:
formateng
2008 Nov 02
1
Wishlist: pass args from demo() to source()
...(2008-10-21 r46766)"
> demo("gsubfn-si")
demo(gsubfn-si)
---- ~~~~~~~~~
Type <Return> to start :
> # given number possibly followed by SI letter (e.g. 32.5k where k means 1000)
> # replace letter with e followed by appropriate digits.
> # (see formatEng2R by Hans-Joerg Bibiko in the R Wiki)
>
> conv <- list(y = "e-24", z = "e-21", a = "e-18", f .... [TRUNCATED]
> gsubfn(".$", conv, c("19", "32.5M"))
[1] "19" "32.5e6"