Rearrangment Utility {cubfits} | R Documentation

## Rearrange Data Structure by ORF Names

### Description

These utility functions rearrange data in the order of ORF names.

### Usage

      rearrange.reu13.df(reu13.df)
      rearrange.y(y)
      rearrange.n(n)
      rearrange.phi.Obs(phi.Obs)

### Arguments

`reu13.df` | a list of `reu13.df` data frames divided by amino acids.
`y` | a list of `y` data frames divided by amino acids.
`n` | a list of `n` vectors divided by amino acids.
`phi.Obs` | a vector of `phi.Obs` format.

### Details

These utility functions take inputs and return ordered outputs. It is necessary to rearrange data in a right order of ORF names which avoids subsetting data frame within MCMC and improve performance.

### Value

The outputs are in the same format of inputs except the order of data is sorted by ORF names.

### Author(s)

Wei-Chen Chen wccsnow@gmail.com.

### References

https://github.com/snoweye/cubfits/

### See Also

AllDataFormats, `convert.n.to.list()`, `convert.reu13.df.to.list()`, and `convert.y.to.list()`.

### Examples

    ## Not run:
    suppressMessages(library(cubfits, quietly = TRUE))

    reu13.df <- rearrange.reu13.df(ex.train$reu13.df)
    y <- rearrange.y(ex.train$y)
    n <- rearrange.n(ex.train$n)
    phi.Obs <- rearrange.phi.Obs(ex.train$phi.Obs)

    ## End(Not run)

[Package cubfits version 0.1-3 Index]