Search notes:

R function: print

#
#   S.a. ../examples/printing_characters.R
#

print("foo")
# [1] "foo"

print(c("bar", "baz"))
# [1] "bar" "baz"

print("foo\"bar")
# [1] "foo\"bar"

print("foo\"bar", quote=FALSE)
# [1] foo"bar

print(matrix(c('foo', 1, 2, 'bar', 3, 4), 2, 3))
#      [,1]  [,2]  [,3]
# [1,] "foo" "2"   "3"
# [2,] "1"   "bar" "4"

print(10/7)
# [1] 1.428571

print(10/7, digits=4)
# [1] 1.429

string_with_new_line = "foo\nbar"
print(string_with_new_line)
# [1] "foo\nbar"

cat  (string_with_new_line)
# foo
# bar
Github repository about-r, path: /functions/print.R

See also

cat, message, writeLines
sprintf
Index to (some) R functions

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758200926, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/R/functions/print(77): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78