Learn R Programming

pbatR (version 2.1.1)

pbat.work: pbatRwork Temp Directory

Description

Creates a temporary 'pbatRwork' directory, and moves to it. This can be created in the same directory as a pedigree or phenotype file by passing those as parameters instead.

Usage

pbat.work( pedOrPhe=NULL )
pbat.unwork( cur=NULL )

Arguments

pedOrPhe
If a `ped' or `phe' symbolic object (read in without `sym=TRUE' which is the default), then uses that directory + '/pbatRwork' as the current working directory (so all output will go there). Otherwise it just creates a `pbatRwork' directory in the curren
cur
Pass in the output of pbat.work(...), see example below.

Examples

Run this code
ped <- read.ped("mydata")
phe <- read.phe("myphe")

cur <- pbat.work( ped )

res <- pbat.m( trait ~ NONE, ped=ped, phe=phe, fbat="gee" )
...
## whatever you want to do with the results

pbat.unwork( cur ) ## sends you back to where you were

Run the code above in your browser using DataLab