Skip to content

Instantly share code, notes, and snippets.

@jnpaulson
Created February 14, 2015 17:08
Show Gist options
  • Save jnpaulson/72f5976fe1cdc398d1a2 to your computer and use it in GitHub Desktop.
Save jnpaulson/72f5976fe1cdc398d1a2 to your computer and use it in GitHub Desktop.
setMethod("normFactors", signature(object="MRexperiment"),
function(object) {
nf <- pData(obj@expSummary$expSummary)[["normFactors"]]
nf <- unlist(nf)
names( nf ) <- sampleNames(object)
nf
})
setReplaceMethod("normFactors", signature(object="MRexperiment", value="numeric"),
function( object, value ) {
pData(object@expSummary$expSummary)[["normFactors"]] <- value
validObject( object )
object
})
@hcorrada
Copy link

Why the unlist in line 4?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment