Print

Table of Contents

Prevent from echoing a value, specifically a function's return value howto

foo <- function() {
  print("Hello")
  "World"
}
foo()
[1] "Hello"
[1] "World"
bar <- function() {
  print("Hello")
  invisible("World")
}
bar()
[1] "Hello"