Last data update: 2014.03.03

R: Converts microarray input data into a data frame suitable for...
array2ade4R Documentation

Converts microarray input data into a data frame suitable for analysis in ADE4.

Description

Converts input data into a data.frame suitable for analysis in ADE4. This function is called by bga and other made4 function.

Usage

array2ade4(dataset, pos = FALSE, trans = FALSE)

Arguments

dataset

A matrix, data.frame, ExpressionSet or marrayRaw-class. If the input is gene expression data in a matrix or data.frame. The rows and columns are expected to contain the variables (genes) and cases (array samples) respectively.

pos

Logical indicating whether to add an integer to dataset, to generate positive data.frame. Required for dudi.coa or dudi.nsc.

trans

Logical indicating whether dataset should be transposed. Default is FALSE.

Details

bga and other functions in made4 call this function and it is generally not necessary to call array2ade4 this directly.

array2ade4 calls getdata, and will accept a matrix, data.frame, ExpressionSet or marrayRaw-class format. It will also transpose data or add a integer to generate a positive data matrix.

If the input data contains missing values (NA), these must first be removed or imputed (see the R libraries impute() or pamr()).

Value

Returns a data.frame suitable for analysis by ade4 or made4 functions.

Author(s)

Aedin Culhane

See Also

getdata,as in the Bioconductor package convert.

Examples

library(affy)
data(geneData)
class(geneData)
dim(geneData)
dim(array2ade4(geneData))
class(array2ade4(geneData))

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(made4)
Loading required package: ade4
Loading required package: RColorBrewer
Loading required package: gplots

Attaching package: 'gplots'

The following object is masked from 'package:stats':

    lowess

Loading required package: scatterplot3d
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/made4/array2ade4.Rd_%03d_medium.png", width=480, height=480)
> ### Name: array2ade4
> ### Title: Converts microarray input data into a data frame suitable for
> ###   analysis in ADE4.
> ### Aliases: array2ade4
> ### Keywords: manip
> 
> ### ** Examples
> 
> library(affy)
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following object is masked from 'package:ade4':

    score

The following objects are masked from 'package:stats':

    IQR, mad, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
    get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
    match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
    rbind, rownames, sapply, setdiff, sort, table, tapply, union,
    unique, unsplit

Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

> data(geneData)
> class(geneData)
[1] "matrix"
> dim(geneData)
[1] 500  26
> dim(array2ade4(geneData))
[1] 500  26
> class(array2ade4(geneData))
[1] "data.frame"
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>