# 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 head(df)
Source code: rtutorial.dev

With us, you can modify then click Run button to execute the code for better study