hist_feature_category {MatrixQCvis} | R Documentation

## Histogram of features per sample type

### Description

The function 'hist_feature_category' creates histogram plots for each sample type in 'se'.

### Usage

    hist_feature_category(se, measured = TRUE, category = "type", ...)

### Arguments

`se` | 'SummarizedExperiment', the assay slot contains the intensity values per sample. Missing values are encoded as 'NA'.
`measured` | 'logical', should the measured values ('measured = TRUE') or missing values ('measured = FALSE') be taken
`category` | 'character', corresponding to a column in 'colData(se)'
`...` | additional parameters passed to 'geom_histogram', e.g. 'binwidth'.

### Value

'plotly' object from 'ggplotly'

### Examples

    ## create se
    a <- matrix(1:100, nrow = 10, ncol = 10,
                dimnames = list(1:10, paste("sample", 1:10)))
    a[c(1, 5, 8), 1:5] <- NA
    set.seed(1)
    a <- a + rnorm(100)
    cD <- data.frame(name = colnames(a), type = c(rep("1", 5), rep("2", 5)))
    rD <- data.frame(spectra = rownames(a))
    se <- SummarizedExperiment::SummarizedExperiment(assay = a,
        rowData = rD, colData = cD)

    hist_feature_category(se, measured = TRUE, category = "type")

[Package MatrixQCvis version 1.2.4 Index]