create_mofa_from_df {MOFA2} | R Documentation

## create a MOFA object from a data.frame object

### Description

Method to create a `MOFA` object from a data.frame object

### Usage

    create_mofa_from_df(df)

### Arguments

`df` | `data.frame` object with at most 5 columns: `sample`, `group`, `feature`, `view`, `value`. The `group` column (optional) indicates the group of each sample when using the multi-group framework. The `view` column (optional) indicates the view of each feature when having multi-view data.

### Value

Returns an untrained `MOFA` object

### Examples

    # Using an existing simulated data with two groups and two views
    file <- system.file("extdata", "test_data.RData", package = "MOFA2")

    # Load data (in long data.frame format)
    load(file)
    MOFAmodel <- create_mofa_from_df(dt)

[Package MOFA2 version 1.0.1 Index]