My assignment is sorting "Petal.Length" in iris dataset (which is offered by R)
'L' (less than 1.6)
'M' (between L and H)
'H" (more than 5.1)
and print out? display? the outcome
sorry for my broken english
Thank you in advance
My assignment is sorting "Petal.Length" in iris dataset (which is offered by R)
'L' (less than 1.6)
'M' (between L and H)
'H" (more than 5.1)
and print out? display? the outcome
sorry for my broken english
Thank you in advance
with subset
you can filter the dataframe based on each of your 3 conditions. Then, rbind
those together:
rbind(
subset(iris, Petal.Length < 1.6),
subset(iris, Petal.Length>=1.6 & Petal.Length<=5.1),
subset(iris, Petal.Length > 5.1)
)