Analyzing and Visualizing a Dataset

Step 1: Create a Dataset

rCopy code# Create a sample dataset
set.seed(123)  # For reproducibility
data <- data.frame(
  id = 1:100,
  age = sample(18:65, 100, replace = TRUE),
  height = rnorm(100, mean = 170, sd = 10),
  weight = rnorm(100, mean = 70, sd = 15)
)

# View the first few rows of the dataset
head(data)

Comments

Leave a Reply

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