#check results with: class(z);exprs(z);pData(z);fData(z);annotation(z)
#matrices of intensities:
nfeat <- 4; nsamx <- 8; nsamy <- 6
X <- matrix(runif(nfeat * nsamx, min = 0, max = 100), nfeat, nsamx)
Y <- matrix(runif(nfeat * nsamy, min = 0, max = 200), nfeat, nsamy)
#matrices of log intensities:
x <- log(X)
y <- log(Y)
#data structures:
pD <- cbind(class.1 = c(rep("brown", 5), rep("white", ncol(x) - 5)),
class.2 = c(rep("small", 3), rep("big", ncol(x) - 3)))
fD <- data.frame(class.1 = c(rep("lipidA", 2), rep("lipidB", nrow(x) - 2)))
z1 <- nxprnSetPair(x = x, y = y, x.pdata = pD, fdata = "proteins", paired = TRUE,
annot = c("A", "B"))
z2 <- nXprnSet(x = Y, fdata = fD, pdata = "healthy", annot = "ratsB")
z3 <- xprnSet(featureData = fD, exprs = x, phenoData = pD, annotation = "ratsA")
z4 <- xprnSetPair(x = xprnSet(expr = y), y = xprnSet(expr = y))
z5 <- xprnSetPair(x = x, y = y)
Run the code above in your browser using DataLab