xMLrename | R Documentation

## Function to rename predictors used in machine learning

### Description

`xMLrename` is supposed to rename predictors used in machine learning. It returns an object of class "sTarget".

### Usage

    xMLrename(sTarget, old_names, new_names)

### Arguments

`sTarget` | an object of class "sTarget"
`old_names` | a vector for the original names of predictors to be renamed
`new_names` | a vector for the new names

### Value

an object of class "sTarget"

### Note

none

### See Also

`xMLrandomforest`

### Examples

    ## Not run:
    # Load the library
    library(Pi)

    ## End(Not run)
    RData.location <- "http://galahad.well.ox.ac.uk/bigdata"
    ## Not run:
    old_names <- colnames(sTarget$predictor)[-c(1,2)]
    new_names <- c('Annotation_disease genes (dGenes)',
    'Annotation_phenotype genes (pGenes)', 'Annotation_function genes
    (fGenes)', 'nearbyGenes_nearby genes (nGenes)', 'eQTL_eQTL: resting
    state (CD14+)', 'eQTL_eQTL: activating state (CD14+ by LPS2h)',
    'eQTL_eQTL: activating state (CD14+ by LPS24h)', 'eQTL_eQTL: activating
    state (CD14+ by IFN24h)', 'eQTL_eQTL: B cells', 'eQTL_eQTL: monocytes',
    'eQTL_eQTL: CD4+ T cells', 'eQTL_eQTL: CD8+ T cells', 'eQTL_eQTL:
    neutrophils', 'eQTL_eQTL: NK cells','eQTL_eQTL: peripheral blood',
    'HiC_Hi-C: monocytes', 'HiC_Hi-C: macrophages (M0)', 'HiC_Hi-C:
    macrophages (M1)', 'HiC_Hi-C: macrophages (M2)', 'HiC_Hi-C:
    neutrophils', 'HiC_Hi-C: CD4+ T cells (naive)', 'HiC_Hi-C: CD4+ T cells
    (total)', 'HiC_Hi-C: CD8+ T cells (naive)', 'HiC_Hi-C: CD8+ T cells
    (total)', 'HiC_Hi-C: B cells (naive)', 'HiC_Hi-C: B cells (total)')
    sTarget_rename <- xMLrename(sTarget, old_names, new_names)

    ## End(Not run)