create_initial_view {mistyR} | R Documentation

## Start here: create a basic view composition with an intraview

### Description

This function is the first one to be called when building a mistyR workflow, starting from view composition. The initial view describes the intraview of the sample.

### Usage

    create_initial_view(data, unique.id = NULL)

### Arguments

`data` | A `data.frame` or a `tibble` containing expression information for all markers of interest (in named columns) for each spatial unit (in rows).
`unique.id` | A `character` vector. Identifier of the current sample. If not provided (`unique.id = NULL`) then an id is automatically generated by calculating the md5 hash of `table`.

### Value

An initial mistyR view composition containing an intraview list item named described with abbreviation "intra" and data as provided in `data` and a misty.uniqueid list item containing the provided or automatically calculated `unique.id`. A cache folder for the sample will be automatically created in the working directory as a subfolder of ‘.misty.temp/’ with the same name as `unique.id`.

### See Also

Other view composition functions: `add_juxtaview()`, `add_paraview()`, `add_views()`, `create_view()`, `remove_views()`

### Examples

    # Create an intrinsic view from the first sample in the dataset synthetic.

    library(dplyr)

    # get the expression data
    data("synthetic")
    expr <- synthetic[[1]] %>% select(-c(row, col, type))

    create_initial_view(expr)

[Package mistyR version 1.2.1 Index]