process_data {famSKATRC} | R Documentation |
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.
process_data(Data = read.table(system.file("extdata", "data",
package = "famSKATRC"), header = TRUE))
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:
|
Returns the data frame with completed preprocessing changes for famSKATRC. Mainly reworking IDs so there are not duplicates.
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)
}