flower.Rd8 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
#> 'data.frame': 18 obs. of 8 variables:
#> $ V1: Factor w/ 2 levels "0","1": 1 2 1 1 1 1 1 1 2 2 ...
#> $ V2: Factor w/ 2 levels "0","1": 2 1 2 1 2 2 1 1 2 2 ...
#> $ V3: Factor w/ 2 levels "0","1": 2 1 1 2 1 1 1 2 1 1 ...
#> $ V4: Factor w/ 5 levels "1","2","3","4",..: 4 2 3 4 5 4 4 2 3 5 ...
#> $ V5: Ord.factor w/ 3 levels "1"<"2"<"3": 3 1 3 2 2 3 3 2 1 2 ...
#> $ V6: Ord.factor w/ 18 levels "1"<"2"<"3"<"4"<..: 15 3 1 16 2 12 13 7 4 14 ...
#> $ V7: num 25 150 150 125 20 50 40 100 25 100 ...
#> $ V8: num 15 50 50 50 15 40 20 15 15 60 ...
## "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
#> winters shadow tubers color soil preference height distance
#> 1 FALSE TRUE TRUE red wet 15 25 15
#> 2 TRUE FALSE FALSE yellow dry 3 150 50
#> 3 FALSE TRUE FALSE pink wet 1 150 50
#> 4 FALSE FALSE TRUE red normal 16 125 50
#> 5 FALSE TRUE FALSE blue normal 2 20 15
#> 6 FALSE TRUE FALSE red wet 12 50 40
#> 7 FALSE FALSE FALSE red wet 13 40 20
#> 8 FALSE FALSE TRUE yellow normal 7 100 15
#> 9 TRUE TRUE FALSE pink dry 4 25 15
#> 10 TRUE TRUE FALSE blue normal 14 100 60
#> 11 TRUE TRUE TRUE blue wet 8 45 10
#> 12 TRUE TRUE TRUE white normal 9 90 25
#> 13 TRUE TRUE FALSE white normal 6 20 10
#> 14 TRUE TRUE TRUE red normal 11 80 30
#> 15 TRUE FALSE FALSE pink normal 10 40 20
#> 16 TRUE FALSE FALSE red normal 18 200 60
#> 17 TRUE FALSE FALSE yellow normal 17 150 60
#> 18 FALSE FALSE TRUE yellow dry 5 25 10
## ==> example(daisy) on how it is used