matrix96: Formatting Long Dataframe in to a Matrix Layout of Multi well...

Description Usage Arguments Details Value Author(s) Examples

View source: R/matrix96.R

Description

This function format a long dataframe (with col and row columns) in to a multiwell plate matrix layout.

Usage

1
matrix96 (dataframe, column, rm = "FALSE")

Arguments

dataframe

dataframe to be formatted

column

name of column (as a string in "") that need be converted as a matrix

rm

If rm = "TRUE" then -ve and NA are assigned as 0

Details

The 'dataframe' to be formatted should have a 'col' and 'row' columns representing the column and rowname of the corresponding multiwell plate.

Value

A matrix data with row and column names corresponding to multiwell plate

Author(s)

A.A Palakkan

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## loading data
data(rawdata96, metafile96, metafile384)
rawdata<- data2plateformat(rawdata96, platetype = 96)
rawdata<- plate2df(rawdata)

## eg:1 rawdata to matrix format (column: value)
matrix96(rawdata,"value")

## eg:2 metafile96 to matrix format (column: id)
matrix96(metafile96,"id")

## eg:3 metafile384 to matrix format (column: cell)
matrix96(metafile384,"cell")

bioassays documentation built on Oct. 23, 2020, 6:48 p.m.