## Simulated sex and weight data for 5 individuals:
sex <- sample(c("f", "m"), 5, replace = TRUE)
weight <- rnorm(5, mean = 10, sd = 1)
raw.mat <- data.frame(sex, weight)
new.mat <- MakeCovMat(~sex + weight, data = raw.mat)
Run the code above in your browser using DataLab