View the Top Rows in R DataFrame using Head
The head() function can be used to view the top rows in R DataFrame: Copy head(df, number of top rows needed) For example, to view the top 3 rows: Copy # Create a sample DataFrame df <- data.frame(product = c(“computer”, “monitor”, “keyboard”, “printer”, “tablet”), price = c(1200, 400, 100, 200, 300), brand = c(“A”, “B”, … Read more