Head function in R

head function in r
# Create a data frame
df <- data.frame(
    ID = c(1:100),
    math = c(round(runif(100,1,10))),
    physics = c(round(runif(100,1,10))),
    english = c(round(runif(100,1,10)))
# Return the first n rows of the data frame

Source code: rtutorial.dev

Posted in R

Leave a Reply

Your email address will not be published. Required fields are marked *