Description Usage Arguments References See Also Examples
Plot pedigree
1 2 3 4 5 |
x |
An object of class ped. |
ref_year |
When provided, the reference year for age labels. Users may supply a (numeric) year which will create age labels at the specified year. Alternatively, users may set |
gen_lab |
Logical. Should generation labels be printed in the margin. By default, |
plot_legend |
Logical. Should legend for symbol shading be plotted. By default, |
location |
The location for the pedigree legend, as in |
radius |
The radius size for the pedigree legend, as in |
density |
The density of shading in plotted symbols, as in |
angle |
The angle of shading in plotted symbols, as in |
gen_stretch |
Numeric. Used to stretch the spacing between generation lables. By default, |
cex |
The text size. By default, |
adj |
When |
line |
When |
mar |
The sizes for plot margins, as in |
... |
Extra options that feed to |
Terry M Therneau and Jason Sinnwell (2015). kinship2: Pedigree Functions. R package version 1.6.4. https://CRAN.R-project.org/package=kinship2
plot.pedigree
, pedigree.legend
, plot
, par
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | #Read in age-specific harard data and create hazard object.
data(AgeSpecific_Hazards)
haz_obj <- hazard(hazardDF = AgeSpecific_Hazards)
#Simulate a pedigree ascertained for multiple affecteds
set.seed(2)
RVped2015 <- sim_RVped(hazard_rates = haz_obj,
num_affected = 2,
ascertain_span = c(1900, 2015),
GRR = 30, carrier_prob = 0.002,
RVfounder = TRUE,
stop_year = 2015,
recall_probs = c(1),
founder_byears = c(1900, 1905),
FamID = 1)[[2]]
summary(RVped2015)
#plot pedigree without age labels
plot(RVped2015)
#plot pedigree with age labels, set the
#reference year to be the ascertainment year
plot(RVped2015, ref_year = "ascYr")
#plot pedigree with age lablels at specified reference years.
plot(RVped2015, ref_year = 2015, cex = 0.75, symbolsize = 0.95)
plot(RVped2015, ref_year = 2005, cex= 0.75, symbolsize = 1.25)
plot(RVped2015, ref_year = 1995, cex= 0.75, symbolsize = 1.25)
plot(RVped2015, ref_year = 1985, cex= 0.75, symbolsize = 1.25)
# plot pedigree generation labels
plot(RVped2015, ref_year = 2015,
gen_lab = TRUE,
cex = 0.75, symbolsize = 0.95)
# use gen_stretch to place extra space between generation labels
# NOTE: by default, gen_stretch = 2; increase for extra space.
plot(RVped2015, ref_year = 2015,
gen_lab = TRUE, gen_stretch = 3,
cex = 0.75, symbolsize = 0.95)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.