reduce_dimensions-methods: Dimension reduction of the feature value data

Description Usage Arguments Details Value Examples

Description

reduce_dimensions() takes as imput a 'tbl' formatted as | <element> | <feature> | <value> | <...> | and calculates the reduced dimensional space of the feature value. The functions available are PCA, MDS (Robinson et al., 2010, <doi:10.1093/bioinformatics/btp616>), tSNE (Laurens van der Maaten, 2009)

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
reduce_dimensions(
  .data,
  .element,
  .feature,
  .value,
  method,
  .dims = 2,
  top = Inf,
  of_elements = TRUE,
  transform = NULL,
  scale = TRUE,
  action = "add",
  ...
)

## S4 method for signature 'spec_tbl_df'
reduce_dimensions(
  .data,
  .element,
  .feature,
  .value,
  method,
  .dims = 2,
  top = Inf,
  of_elements = TRUE,
  transform = NULL,
  scale = TRUE,
  action = "add",
  ...
)

## S4 method for signature 'tbl_df'
reduce_dimensions(
  .data,
  .element,
  .feature,
  .value,
  method,
  .dims = 2,
  top = Inf,
  of_elements = TRUE,
  transform = NULL,
  scale = TRUE,
  action = "add",
  ...
)

Arguments

.data

A 'tbl' formatted as | <element> | <feature> | <value> | <...> |

.element

The name of the element column (normally elements).

.feature

The name of the feature column (normally features)

.value

The name of the column including the numerical value the clustering is based on (normally feature value)

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_elements

A boolean. In case the input is a nanny object, it indicates Whether the element column will be element or feature column

transform

A function to use to tranforma the data internalli (e.g., log1p)

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"

Details

\lifecycle

maturing

This function reduces the dimensions of the feature values. It can use multi-dimensional scaling (MDS) of principal component analysis (PCA).

Value

A tbl object with additional columns for the reduced dimensions

A tbl object with additional columns for the reduced dimensions

A tbl object with additional columns for the reduced dimensions

Examples

1
2
3
4
5
  reduce_dimensions(mtcars_tidy, car_model, feature, value, method="PCA")
  
  reduce_dimensions(mtcars_tidy, car_model, feature, value, method="MDS")
  
  reduce_dimensions(mtcars_tidy, car_model, feature, value, method="tSNE")

nanny documentation built on July 1, 2020, 10:20 p.m.