DEG_data <- read.csv(file = 'DEG_changes(1).csv', header = TRUE)
concentrations <- DEG_data$concentration
unique_concentration <- unique(DEG_data$concentration)
numDEGs <- DEG_data$numberDEGs
changeDEGs <- DEG_data$changeDEG
upregulated_indices <- which(changeDEGs == "upregulated")
upregulated_conc2nM <- numDEGs[upregulated_indices & concentrations == unique_concentration[1]]
upregulated_conc5nM <- numDEGs[upregulated_indices & concentrations == unique_concentration[2]]
upregulated_conc50nM <- numDEGs[upregulated_indices & concentrations == unique_concentration[3]]
I am trying to make a subset that contains just data from the "upregulated" part of the data column but it is also taking data from the column that is "downregulated"