print function r code example
Example 1: print in r
cat(c("hello", "world", "\n"))
Example 2: print in r
> x <- 10.4678
> print(x,digits=3)
[1] 10.5
Example 3: print in r
cat(c("hello", "world", "\n"))
#hello world
cat(c("hello", "world", "\n"))
> x <- 10.4678
> print(x,digits=3)
[1] 10.5
cat(c("hello", "world", "\n"))
#hello world