I'm trying to print only the first 45 rows of a tibble data frame:
print( data_frame_name, n = 45)
This will return the first 45 rows of my DF.
However, when I tried to specify a column using the dollar sign operator "$" such that
print( data_frame_name$column_name, n = 45)
R gave me an error message "invalid 'na.print' specification", is there something I am missing?
I would try a workaround method but the problem asks that I use "$" and print().
print()
How about
print(data_frame_name$column_name[1:45])
if you're required to use print and $?
2.1m questions
2.1m answers
60 comments
57.0k users