num2str {clim.pact}R Documentation

Convert numbers to string and format

Description

Convert numbers to string and format. Similar to FORTRAN 'F8.2' format statement.

Usage

num2str(x,dec=2,f.width=NULL,d.point=".")

Arguments

x Real numbers.
dec number of decmal points.
f.width width of field.
d.point character marking the decimal point.

Value

string.

Author(s)

R.E. Benestad

Examples

print(num2str(c(1,23.4282,-3.14),dec=3))
#[1] "1.000"  "23.428" "-3.140"

[Package clim.pact version 2.2-15 Index]