Beer consumption data
beers.Rd
A small data frame describing the beer consumption and and demographics of 48 people.
Usage
data("beers")
Format
A data frame with 48 observations on the following 8 variables.
Record_ID
a numeric vector
Work
a factor with levels
Employed
Unemployed
Consumption
a numeric vector
Gender
a factor with levels
Female
Male
Age
a numeric vector
Day
a numeric vector
Month
a numeric vector
Year
a numeric vector
Examples
data(beers)
beers
#> Record_ID Work Consumption Gender Age Day Month Year
#> 1 1 Employed 100 Male 25 1 7 2017
#> 2 2 Employed 110 Male 25 2 8 2017
#> 3 3 Employed 120 Male 25 3 7 2017
#> 4 4 Employed 150 Male 35 4 7 2017
#> 5 5 Employed 155 Male 35 1 9 2017
#> 6 6 Employed 153 Male 35 2 10 2017
#> 7 7 Employed 175 Male 45 5 11 2017
#> 8 8 Employed 190 Male 45 19 8 2017
#> 9 9 Employed 200 Male 45 24 9 2017
#> 10 10 Employed 180 Male 55 15 1 2017
#> 11 11 Employed 200 Male 55 13 2 2017
#> 12 12 Employed 250 Male 55 26 5 2017
#> 13 13 Employed 210 Female 25 29 4 2017
#> 14 14 Employed 220 Female 25 15 3 2017
#> 15 15 Employed 230 Female 25 11 12 2017
#> 16 16 Employed 200 Female 35 8 6 2017
#> 17 17 Employed 190 Female 35 9 8 2017
#> 18 18 Employed 180 Female 35 12 8 2017
#> 19 19 Employed 170 Female 45 16 11 2017
#> 20 20 Employed 175 Female 45 19 2 2017
#> 21 21 Employed 180 Female 45 21 4 2017
#> 22 22 Employed 120 Female 55 22 6 2017
#> 23 23 Employed 125 Female 55 7 8 2017
#> 24 24 Employed 140 Female 55 16 9 2017
#> 25 25 Unemployed 150 Male 25 17 10 2017
#> 26 26 Unemployed 165 Male 25 11 11 2017
#> 27 27 Unemployed 170 Male 25 10 12 2017
#> 28 28 Unemployed 190 Male 35 2 6 2017
#> 29 29 Unemployed 180 Male 35 1 7 2017
#> 30 30 Unemployed 195 Male 35 30 4 2017
#> 31 31 Unemployed 223 Male 45 29 3 2017
#> 32 32 Unemployed 225 Male 45 21 1 2017
#> 33 33 Unemployed 250 Male 45 25 9 2017
#> 34 34 Unemployed 290 Male 55 26 10 2017
#> 35 35 Unemployed 300 Male 55 20 8 2017
#> 36 36 Unemployed 350 Male 55 19 7 2017
#> 37 37 Unemployed 200 Female 25 18 6 2017
#> 38 38 Unemployed 190 Female 25 13 9 2017
#> 39 39 Unemployed 180 Female 25 16 11 2017
#> 40 40 Unemployed 150 Female 35 19 12 2017
#> 41 41 Unemployed 135 Female 35 22 10 2017
#> 42 42 Unemployed 144 Female 35 21 9 2017
#> 43 43 Unemployed 125 Female 45 26 6 2017
#> 44 44 Unemployed 130 Female 45 28 5 2017
#> 45 45 Unemployed 140 Female 45 27 8 2017
#> 46 46 Unemployed NA Female 55 29 8 2017
#> 47 47 Unemployed 125 Female 55 30 9 2017
#> 48 48 Unemployed 140 Female 55 1 10 2017
str(beers)
#> 'data.frame': 48 obs. of 8 variables:
#> $ Record_ID : int 1 2 3 4 5 6 7 8 9 10 ...
#> $ Work : Factor w/ 2 levels "Employed","Unemployed": 1 1 1 1 1 1 1 1 1 1 ...
#> $ Consumption: int 100 110 120 150 155 153 175 190 200 180 ...
#> $ Gender : Factor w/ 2 levels "Female","Male": 2 2 2 2 2 2 2 2 2 2 ...
#> $ Age : int 25 25 25 35 35 35 45 45 45 55 ...
#> $ Day : int 1 2 3 4 1 2 5 19 24 15 ...
#> $ Month : int 7 8 7 7 9 10 11 8 9 1 ...
#> $ Year : int 2017 2017 2017 2017 2017 2017 2017 2017 2017 2017 ...
f <- beers.csv()
basename(f)
#> [1] "beers.csv"
beers2 <- read.csv(f, sep = ";")
beers2
#> Record_ID Work Consumption Gender Age Day Month Year
#> 1 1 Employed 100 Male 25 1 7 2017
#> 2 2 Employed 110 Male 25 2 8 2017
#> 3 3 Employed 120 Male 25 3 7 2017
#> 4 4 Employed 150 Male 35 4 7 2017
#> 5 5 Employed 155 Male 35 1 9 2017
#> 6 6 Employed 153 Male 35 2 10 2017
#> 7 7 Employed 175 Male 45 5 11 2017
#> 8 8 Employed 190 Male 45 19 8 2017
#> 9 9 Employed 200 Male 45 24 9 2017
#> 10 10 Employed 180 Male 55 15 1 2017
#> 11 11 Employed 200 Male 55 13 2 2017
#> 12 12 Employed 250 Male 55 26 5 2017
#> 13 13 Employed 210 Female 25 29 4 2017
#> 14 14 Employed 220 Female 25 15 3 2017
#> 15 15 Employed 230 Female 25 11 12 2017
#> 16 16 Employed 200 Female 35 8 6 2017
#> 17 17 Employed 190 Female 35 9 8 2017
#> 18 18 Employed 180 Female 35 12 8 2017
#> 19 19 Employed 170 Female 45 16 11 2017
#> 20 20 Employed 175 Female 45 19 2 2017
#> 21 21 Employed 180 Female 45 21 4 2017
#> 22 22 Employed 120 Female 55 22 6 2017
#> 23 23 Employed 125 Female 55 7 8 2017
#> 24 24 Employed 140 Female 55 16 9 2017
#> 25 25 Unemployed 150 Male 25 17 10 2017
#> 26 26 Unemployed 165 Male 25 11 11 2017
#> 27 27 Unemployed 170 Male 25 10 12 2017
#> 28 28 Unemployed 190 Male 35 2 6 2017
#> 29 29 Unemployed 180 Male 35 1 7 2017
#> 30 30 Unemployed 195 Male 35 30 4 2017
#> 31 31 Unemployed 223 Male 45 29 3 2017
#> 32 32 Unemployed 225 Male 45 21 1 2017
#> 33 33 Unemployed 250 Male 45 25 9 2017
#> 34 34 Unemployed 290 Male 55 26 10 2017
#> 35 35 Unemployed 300 Male 55 20 8 2017
#> 36 36 Unemployed 350 Male 55 19 7 2017
#> 37 37 Unemployed 200 Female 25 18 6 2017
#> 38 38 Unemployed 190 Female 25 13 9 2017
#> 39 39 Unemployed 180 Female 25 16 11 2017
#> 40 40 Unemployed 150 Female 35 19 12 2017
#> 41 41 Unemployed 135 Female 35 22 10 2017
#> 42 42 Unemployed 144 Female 35 21 9 2017
#> 43 43 Unemployed 125 Female 45 26 6 2017
#> 44 44 Unemployed 130 Female 45 28 5 2017
#> 45 45 Unemployed 140 Female 45 27 8 2017
#> 46 46 Unemployed NA Female 55 29 8 2017
#> 47 47 Unemployed 125 Female 55 30 9 2017
#> 48 48 Unemployed 140 Female 55 1 10 2017
identical(beers, beers2)
#> [1] FALSE