RC_designCheck: RC_designCheck

Description Usage Arguments Details Value Author(s) References Examples

View source: R/RC_designCheck.R

Description

Perform a check between your Data and Design dataframe.

Usage

1
RC_designCheck(Data, Design, ...)

Arguments

Data

Your initial dataframe containing the gene expression or microarray value for examples

Design

Your dataframe descrining your sample. It should match the Data dataframe.

Details

It will check if the number of rows are corresponding and if the name are equall with the all.equal function. It will return some message that i advice you to read.

Value

Return the empty void of dark matter. But is dark matter emtpy ?

Author(s)

Benjamin Vittrant

References

The experience to avoid futur problems.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
RC_designCheck = function(Data, Design){

  # Data checking and error handling
  row_Data = dim(Data)[1]
  col_Data = dim(Data)[2]
  row_Design = dim(Design)[1]
  col_Design = dim(Design)[2]

  if(row_Data != row_Design){
    return("Your design file has not the same number of rows than your data file")
  }

  print("I tested your rownames from Data and Design with the all.equal function:")
  print(all.equal(row.names(Data), row.names(Design)))

  # Everything good function can continue
  print(paste("You have",row_Data,"samples with",col_Data,"features in your Data file.",sep=" "))
  print(paste("And",col_Design,"descriptors for your sample in your Design file:", sep = " "))
  print(colnames(Design))
}

bvittrant/RCommon documentation built on May 4, 2020, 3:04 p.m.