At each depth, there are a recorded number of infected individuals. I want to make depth categories. And I'm trying to organize the number of infected that fall under each category. Hence why I want to make depth categories, ranges for example, of 0-7 meters, 8-10 meters, 11-15 meters, and 16-26 meters.
(The reason I am making a new data frame is that the other is filled with other variables. This is just for me to be more organized and make less mistakes.)
CDD_A <- read.csv("Coral Disease Data by R.V.Woesik&ChelseaV2.csv") # importing a csv file and assigning it a name.
Infected <- subset(CDD_A,select=Sum.Infected) #Subsetting sum infected values from data frame.
Depth<-subset(CDD_A, select = Depth) #subsetting depth values from data frame
Lat <- subset(CDD_A, select = LAT) #subsetting latitude values from data frame
Long <- subset(CDD_A, select = LONG) #Subsetting longitude from data frame.
ID_A = cbind(Lat, Long, Depth, Infected) #configuring all variables that were subsetted into a new data frame.
I see the confusion now. At each depth, there are a recorded number of infected individuals. I want to make depth categories. And im trying to organize the number of infected that fall under each category. Hence why I want to make depth categories, ranges for example, of 0-7 meters, 8-10 meters, 11-15 meters, and 16-26 meters.