reduce_dimensions,tidybulk-method {tidybulk} | R Documentation

## reduce_dimensions

### Description

reduce_dimensions

### Usage

    ## S4 method for signature 'tidybulk'
    reduce_dimensions(
      .data,
      .element = NULL,
      .feature = NULL,
      .abundance = NULL,
      method,
      .dims = 2,
      top = 500,
      of_samples = TRUE,
      log_transform = TRUE,
      scale = TRUE,
      action = "add",
      ...
    )

### Arguments

`.data` | A 'tbl' formatted as | <SAMPLE> | <TRANSCRIPT> | <COUNT> | <...> |
`.element` | The name of the element column (normally samples).
`.feature` | The name of the feature column (normally transcripts/genes)
`.abundance` | The name of the column including the numerical value the clustering is based on (normally transcript abundance)
`method` | A character string. The dimension reduction algorithm to use (PCA, MDS, tSNE).
`.dims` | A list of integer vectors corresponding to principal components of interest (e.g., list(1:2, 3:4, 5:6))
`top` | An integer. How many top genes to select for dimensionality reduction
`of_samples` | A boolean. In case the input is a tidybulk object, it indicates Whether the element column will be sample or transcript column
`log_transform` | A boolean, whether the value should be log-transformed (e.g., TRUE for RNA sequencing data)
`scale` | A boolean for method="PCA", this will be passed to the 'prcomp' function. It is not included in the ... argument because although the default for 'prcomp' if FALSE, it is advisable to set it as TRUE.
`action` | A character string. Whether to join the new information to the input tbl (add), or just get the non-redundant tbl with the new information (get).
`...` | Further parameters passed to the function prcomp if you choose method="PCA" or Rtsne if you choose method="tSNE"

### Value

A tbl object with additional columns for the reduced dimensions

[Package tidybulk version 0.99.23 Index]