Why do we need the “\n” or “\n\n” with cat( )? When I run this code from the lesson:
cat(“Variables in the current directory: \n”)
ls() # returns all the variables created in the workspace
cat("\n")
cat(“Deleting myRealNumeric and myDecimalNumeric \n\n”)
rm(myRealNumeric, myDecimalNumeric) # delete the two mentioned variables
cat(“Variables in the current directory, now: \n”)
ls() # returns all the variables created in the workspace
** # myRealNumeric, myDecimalNumeric are now deleted**
cat("\n")
WITHOUT the "\n"s in them I seem to get the same result… what are they for?
Type your question above this line.
Course: https://www.educative.io/collection/10370001/5396243679281152
Lesson: https://www.educative.io/collection/page/10370001/5396243679281152/5088078450393088