powered by
write_int formats a numeric input into an interval to be printed, e.g., in an RMarkdown document.
write_int
write_int(x, delim = "(", digits = 2)
Returns a character string of the form "(x[1], x[2])" (or supplied bracket delimiter).
A length-2 numeric vector consisting of the endpoints of the interval or an n-row by 2-column matrix of endpoints.
The bracket delimiters to surround the interval. Must be either a round bracket, square bracket, curly bracket, or angled bracket.
Number of digits to round to (default to 2). Will keep trailing zeros.
If a matrix is provided, the values in each row will be used to create a formatted interval.
write_int(x=c(1.2, 2.345)) write_int(x=c(1.2, 2.345), delim='[')
Run the code above in your browser using DataLab