num2str | R Documentation |
Converts a numeric value to character. This is essentially a
wrapper over base::as.character()
.
num2str(A, format) ## S4 method for signature 'numeric,missing' num2str(A) ## S4 method for signature 'array,missing' num2str(A) ## S4 method for signature 'numeric,numeric' num2str(A, format) ## S4 method for signature 'array,numeric' num2str(A, format) ## S4 method for signature 'numeric,character' num2str(A, format) ## S4 method for signature 'array,character' num2str(A, format)
A |
numeric object |
format |
either a number or a string (see |
A
, with its format possibly reshaped by format
num2str(A = numeric, format = missing)
: Converting a vector to character
num2str(A = array, format = missing)
: Converting an array to character
num2str(A = numeric, format = numeric)
: Rounding a vector, then converting to character
num2str(A = array, format = numeric)
: Rounding an arrray, then converting to character
num2str(A = numeric, format = character)
: Formatting a vector, then converting to character
num2str(A = array, format = character)
: Formatting an array, then converting to character
Waldir Leoncio
X <- rnorm(10) num2str(X) num2str(X, 2) A <- matrix(runif(4), 2) num2str(A) num2str(A, 3) num2str(pi * 10, "%e")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.