head()
andtail()
returns the first or last parts of a vector, matrix, table, data frame or function. Sincehead()
andtail()
are generic functions, they may also have been extended to other classes.
iris
dataset using head()
function. iris
dataset using tail()
function.
# Print all values 'iris'.
print(iris)
# Use head function to see the first six entries in iris dataset.
# Use tail function to see the last six entries in iris dataset.
# Print all values 'iris'.
print(iris)
# Use head function to see the first six entries in iris dataset.
head(iris)
# Use tail function to see the last six entries in iris dataset.
tail(iris)
test_function("head")
test_function("tail")
success_msg("Great! Head over to the next exercise.")