printf
From R.utils v2.7.0
by Henrik Bengtsson
C-style formatted output
C-style formatted output.
- Keywords
- utilities
Usage
# S3 method for default
printf(fmt, ..., sep="", file="")
Arguments
Value
Returns nothing.
See Also
Examples
# NOT RUN {
cat("Hello world\n")
printf("Hello world\n")
x <- 1.23
cat(sprintf("x=%.2f\n", x))
printf("x=%.2f\n", x)
y <- 4.56
cat(sprintf(c("x=%.2f\n", "y=%.2f\n"), c(x,y)), sep="")
printf(c("x=%.2f\n", "y=%.2f\n"), c(x,y))
# }
Community examples
Looks like there are no examples yet.