rotate_dimensions | R Documentation |
rotate_dimensions() takes as imput a 'tbl' formatted as | <DIMENSION 1> | <DIMENSION 2> | <...> | and calculates the rotated dimensional space of the transcript abundance.
rotate_dimensions( .data, dimension_1_column, dimension_2_column, rotation_degrees, of_samples = T, dimension_1_column_rotated = NULL, dimension_2_column_rotated = NULL, action = "add" )
.data |
A 'tbl' formatted as | <SAMPLE> | <TRANSCRIPT> | <COUNT> | <...> | |
dimension_1_column |
A character string. The column of the dimension 1 |
dimension_2_column |
A character string. The column of the dimension 2 |
rotation_degrees |
A real number between 0 and 360 |
of_samples |
A boolean. In case the input is a tidysc object, it indicates Whether the element column will be sample or transcript column |
dimension_1_column_rotated |
A character string. The column of the rotated dimension 1 (optional) |
dimension_2_column_rotated |
A character string. The column of the rotated dimension 2 (optional) |
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). |
.element |
The name of the element column (normally samples). |
experimental
This function to rotate two dimensions such as the reduced dimensions.
A tbl object with additional columns for the reduced dimensions. additional columns for the rotated dimensions. The rotated dimensions will be added to the original data set as '<NAME OF DIMENSION> rotated <ANGLE>' by default, or as specified in the input arguments.
counts.MDS.rotated = counts.MDS %>% rotate_dimensions(`tSNE 1`, `tSNE 2`, rotation_degrees = 45, .element = sample) counts.MDS.rotated %>% distinct(sample, `tSNE 1`,`tSNE 2`, `Cell type`) %>% ggplot(aes(x=`tSNE 1`, y=`tSNE 2`, color=`Cell type` )) + geom_point()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.