This is just a quick demonstration of how to get R or RStudio working for you. In this example you will draw a pedigree from "Game of Thrones" as well as get the inbreeding coefficents for individuals in the pedigree. We will assume that Jon and Daenerys have a son (Jon II).
make.ped2=function ()
{
library(optiSel)
par(cex=0.75)
Indiv=c('Aegon V','Unknown','Aerys II','Rhaella','Rhaegar','Daenerys','Lyanna','Jon','Jon II')
Sire=c(NA,NA,'Aegon V','Aegon V','Aerys II','Aerys II',NA,'Rhaegar','Jon')
Dam=c(NA,NA,'Unknown','Unknown','Rhaella','Rhaella',NA,'Lyanna','Daenerys')
sex=c('M','F','M','F','M','F','F','M','M')
Pedigree=data.frame(Indiv=Indiv,Sire=Sire,Dam=Dam,Sex=sex)
pedplot(Pedigree)
pedInbreeding(Pedigree)
}