## Not run:
# ### SD3.xls is available from the URL provided in the References.
# da <- read.table("SD3.xls", header = TRUE, sep = "\t", quote = "",
# stringsAsFactors = FALSE)
#
# ### Select ORF, YPD0.1, YPD0.2, YPD15.1, YPD15.2.
# da <- da[, c(1, 8, 9, 10, 11)]
# colnames(da) <- c("ORF", "YPD0.1", "YPD0.2", "YPD15.1", "YPD15.2")
#
# ### Drop inappropriate values (NaN, NA, Inf, -Inf, and 0).
# tmp <- da[, 2:5]
# id.tmp <- rowSums(is.finite(as.matrix(tmp)) & tmp != 0) >= 3
# tmp <- da[id.tmp, 1:5]
# yassour <- tmp[order(tmp$ORF),] # cubfits::yassour
#
# ### Get geometric mean of phi.Obs and scaling similar to Wallace (2013).
# GM <- apply(yassour[, -1], 1, function(x) exp(mean(log(x[x != 0]))))
# phi.Obs <- GM / sum(GM) * 15000
#
# ### Get individual of phi.Obs.
# GM <- apply(yassour[, -1], 1, function(x) exp(mean(log(x[x != 0]))))
# phi.Obs.all <- yassour[, -1] / sum(GM) * 15000
# phi.Obs.all[phi.Obs.all == 0] <- NA
# ## End(Not run)
Run the code above in your browser using DataLab