How can I create a separation line in R output

Screen Link:
https://app.dataquest.io/m/323/data-cleaning-with-r/2/cleaning-the-new-york-city-schools-data

My Code:

head(sat_results)
print(sep="")
head(ap_2010)

What I expected to happen:
I wanted to create a separation line in between the prints of sat_results and ap_2010, so I can view the output easily. How can I do so? Thanks!

What actually happened:

Error in print.default(sep = ""): argument "x" is missing, with no default
Traceback:

1. print(sep = "")
2. print.default(sep = "")
1 Like

Just print the line

print("======================================================================")

You can use equal sign (=), hyphen (-), underscore (_) or any character you want.

[Edit]
You can also print information show what is being outputted

print("The first 10 rows of SAT Results Dataset")
head(sat_results)

print("The first 10 rows of AP 2010 dataset")
head(ap_2010)

For me when doing the following I prefer working with Jupyter notebook, I can use markdown cell for Headings and explanation.

2 Likes