Learn R Programming

hadron (version 3.1.2)

string2error: string2error

Description

takes a string of the form "x(dx)", where dx are the error digits and returns a numeric vector c(x, y), where y is dx as a proper numeric value.

Usage

string2error(x)

Arguments

x

Input character string.

Value

a numeric vector with the first element the value and the second the error

Details

can be used in combination with apply

Examples

Run this code
# NOT RUN {
string2error("0.35667(25)")

s <- c("0.35667(25)", "0.667(50)")
apply(array(s, dim=c(1, length(s))), 2, string2error)

# }

Run the code above in your browser using DataLab