process_data: Process Data

Description Usage Arguments Value See Also Examples

View source: R/process_data.R

Description

Processes the raw data included to produce data identical to the (also included) sample.ped.geno data set. This can be used for processing your own pedigrees with SNP data.

Usage

1
2
process_data(Data = read.table(system.file("extdata", "data",
                                            package = "famSKATRC"), header = TRUE))

Arguments

Data

A string, the path to the location of the data file you are processing, formatted as the included example, which can be loaded with: read.table(system.file("extdata", "data", package = "famSKATRC"), header = TRUE) and can be found in your filesystem at: system.file("extdata", "data", package = "famSKATRC")

Value

Returns the data frame with completed preprocessing changes for famSKATRC. Mainly reworking IDs so there are not duplicates.

See Also

famSKATRC

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
sample.ped.geno <- process_data()
## The function is currently defined as
function(Data = read.table(system.file("extdata", "data",
                                                package = "famSKATRC"), header = TRUE))
{
  Data[ , "IID"] = paste(Data[ , "FID"]  , Data[ , "IID"]  ,sep=".")
  Data[Data[,"FA"]!=0 , "FA"] = paste(Data[Data[,"FA"]!=0 , "FID"], Data[Data[,"FA"]!=0,
                                                                        "FA"]  ,sep=".")
  Data[Data[,"FA"]!=0 , "MO"] = paste(Data[Data[,"FA"]!=0 , "FID"], Data[Data[,"FA"]!=0,
                                                                        "MO"]  ,sep=".")
  return(Data)
}

famSKATRC documentation built on Nov. 17, 2017, 4:42 a.m.