## channelNames default to alphabetical order of channels
obj <- NChannelSet(
R=matrix(runif(100), 20, 5),
G=matrix(-runif(100), 20, 5))
channelNames(obj)
channelNames(obj) <- c(Gn="G", Rd="R") ## rename
channelNames(obj)
channelNames(obj) <- c("Rd", "Gn") ## reorder
channelNames(obj)
all(assayData(obj)[["Gn"]] <= 0)
all(assayData(obj)[["Rd"]] >= 0)
Run the code above in your browser using DataLab