doLabels {BioNetStat} | R Documentation

## Class vector of data table

### Description

Class vector of data table

### Usage

    doLabels(fileName, factorName = NULL, classes = NULL, dec = ".",
      sep = ";")

### Arguments

`fileName` | the name of the file which the data are to be read from. Each row of the table appears as one line of the file. If it does not contain an absolute path, the file name is relative to the current working directory, getwd().
`factorName` | string indicating the column name used to determine the labels of each row of matrix data. The NULL (default) indicates that the first column will be used.
`classes` | a vector of strings indicating which labels of choosed column will be compared, the minimum are two labels. The NULL (default) indicates that all classes will be compared.
`dec` | the character used in the file for decimal points.
`sep` | the field separator character. Values on each line of the file are separated by this character. If sep = "" the separator is white space, that is one or more spaces, tabs, newlines or carriage returns, if sep=NULL (default), the function uses tabulation for .txt files or ";" for .csv files.

### Value

a vector that identify each row of the readVarFile object as a sample belonging to a state (network).

### Examples

    # Glioma file
    gliomaData <- system.file("extdata", "bnsData.csv", package = "BioNetStat")
    labels<-doLabels(gliomaData)

    # Random file
    test1 <- as.data.frame(cbind(rep(LETTERS[1:4],each=10),matrix(rnorm(120),40,30)))
    write.table(test1, "~/tf.csv",sep=";",row.names=FALSE)
    labels<-doLabels("~/tf.csv")

[Package BioNetStat version 1.2.2 Index]