ShroomData <- read.csv("https://raw.githubusercontent.com/mkollontai/DATA607/master/Assignment_1/agaricus-lepiota.data")
ShroomData <- ShroomData[1:10,1:5]

names(ShroomData) <- c("Edibility","Cap_Shape", "Cap_Surface", "Cap_Color",  "Bruises")

levels(ShroomData$Edibility) <- list(
  Edible = "e",
  Poisonous = "p"
)

levels(ShroomData$Cap_Shape) <- list(
  Bell = "b",
  Conical = "c",
  conveX = "x",
  Flat = "f",
  Knobbed = "k",
  Sunken = "s"
)

levels(ShroomData$Cap_Surface) <- list(
  Fibrous = "f",
  Grooves = "g",
  scalY = "y",
  Smooth = "s"
)

levels(ShroomData$Cap_Color) <- list(
  rowN = "n",
  Buff = "b",
  Cinnamon = "c",
  Grey = "g",
  gReen = "r",
  Pink = "p",
  pUrple = "u",
  rEd = "e",
  White = "w",
  Yellow = "y"
)

levels(ShroomData$Bruises) <- list(
  Bruises = "t",
  No = "f"
)

First 10 rows as a sample:

ShroomData[1:10,]
##    Edibility Cap_Shape Cap_Surface Cap_Color Bruises
## 1     Edible    conveX      Smooth    Yellow Bruises
## 2     Edible      Bell      Smooth     White Bruises
## 3  Poisonous    conveX       scalY     White Bruises
## 4     Edible    conveX      Smooth      Grey      No
## 5     Edible    conveX       scalY    Yellow Bruises
## 6     Edible      Bell      Smooth     White Bruises
## 7     Edible      Bell       scalY     White Bruises
## 8  Poisonous    conveX       scalY     White Bruises
## 9     Edible      Bell      Smooth    Yellow Bruises
## 10    Edible    conveX       scalY    Yellow Bruises