R function for normalization based on one column?
问题 Is it possible to normalize this table in R based on the last column(samples) samples = number of sequenced genomes. So I want to get a normalised distribution of all the genes in all the conditions. Simplified example of my data: I tried: dat1 <- read.table(text = " gene1 gene2 gene3 samples condition1 1 1 8 120 condition2 18 4 1 118 condition3 0 0 1 75 condition4 32 1 1 130", header = TRUE) dat1<-normalize(dat1, method = "standardize", range = c(0, 1), margin = 1L, on.constant = "quiet")