...

/

Difference Between print() and cat()

Difference Between print() and cat()

In this lesson, we provide details about the differences between print() and cat().

Difference between print() and cat()

Both print() and cat() can be used to display text on the screen. Let’s have a look at the code:

print("Educative")

The simple printing method in R is to use print(). As its name indicates, this method prints its arguments on the R console. However, cat() does the same thing but is valid only ...