#Select first 3 rows of data.frame:

test =data.frame(read_excel(“file.xlsx”)

head(test,3)

or

head(test,n=3)

or

test[1:3,]

#Select last 3 rows of data.frame:

tail(test,3)

Advertisements