Hi, I am currently using the DEseq2 package to carry out differential gene expression. When i try to drop levels it gives me an error message saying " no applicable method for 'droplevels' applied to an object of class "character". Can you please explain how I can fix this please? Also I would like some more info on the function 'droplevels' and how to correctly use it in an example please as I am still not sure if I am using it in the correct context.
dds1 <- DESeqDataSetFromMatrix(countData = countdata, colData = colData, design = ~ Celltype+Treatment+Celltype:Treatment) #subset the relevant columsn from full dataset, Call it dds1a dds1a <- dds1[,dds1$Subset == "classical"] # quick check to see we have the correct samples extracted as.data.frame(colData(dds1a)) # Droplevels dds1a$Celltype <- droplevels( dds1a$Celltype) #Error in UseMethod("droplevels") : no applicable method for 'droplevels' applied to an object of class "character"