Generate Factors with specified Levels in R Programming - gl() Function
gl() function in R Language is used to generate factors by specifying the pattern of their levels. Syntax: gl(x, k, length, labels, ordered) Parameters: x: Number of levels k: Number of replications length: Length of result labels: Labels for the vector(optional) ordered: Boolean value to order the