flower | R Documentation |
8 characteristics for 18 popular flowers.
data(flower)
A data frame with 18 observations on 8 variables:
[ , "V1"] | factor | winters |
[ , "V2"] | factor | shadow |
[ , "V3"] | factor | tubers |
[ , "V4"] | factor | color |
[ , "V5"] | ordered | soil |
[ , "V6"] | ordered | preference |
[ , "V7"] | numeric | height |
[ , "V8"] | numeric | distance |
winters, is binary and indicates whether the plant may be left in the garden when it freezes.
shadow, is binary and shows whether the plant needs to stand in the shadow.
tubers, is asymmetric binary and distinguishes between plants with tubers and plants that grow in any other way.
color, is nominal and specifies the flower's color (1 = white, 2 = yellow, 3 = pink, 4 = red, 5 = blue).
soil, is ordinal and indicates whether the plant grows in dry (1), normal (2), or wet (3) soil.
preference, is ordinal and gives someone's preference ranking going from 1 to 18.
height, is interval scaled, the plant's height in centimeters.
distance, is interval scaled, the distance in centimeters that should be left between the plants.
Struyf, Hubert and Rousseeuw (1996), see agnes
.
data(flower)
str(flower) # factors, ordered, numeric
## "Nicer" version (less numeric more self explainable) of 'flower':
flowerN <- flower
colnames(flowerN) <- c("winters", "shadow", "tubers", "color",
"soil", "preference", "height", "distance")
for(j in 1:3) flowerN[,j] <- (flowerN[,j] == "1")
levels(flowerN$color) <- c("1" = "white", "2" = "yellow", "3" = "pink",
"4" = "red", "5" = "blue")[levels(flowerN$color)]
levels(flowerN$soil) <- c("1" = "dry", "2" = "normal", "3" = "wet")[levels(flowerN$soil)]
flowerN
## ==> example(daisy) on how it is used
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.