Open KimBruijns opened 2 years ago
Dear Kim,
really sorry for the very late reply. Was on holidays and am now on a conference. I'll have a look into this soon.
Can you please verify that fad
is indeed a FAData
? I.e. report here the output of class(fad)
? And maybe also of class(mbped)
?
Finally, maybe it's because family 9 consists only of a single member and subsetting drops from a two-dimensional data structure to a character
. Can you maybe also provide this information:
sum(mbped[, "family"] == "9")
My guess would be that during subsetting to family 9 somehow the dimensions (or the FAData
object) gets lost. I also assume that plotPed
works for other families?
Hi!
When running this code: mbsub <- pedigfinal[pedigfinal$famid %in% 7:10, ] mbsub<-rename(mbsub, "family"="famid", "id"="Indiv", "father"="Sire", "mother"="Dam", "sex"="Sex") mbped <- mbsub[, c("family", "id", "father", "mother", "sex")] fad <- FAData(pedigree = mbped) plotPed(fad, family = "9")
The function plotPed() from package::FamAgg is not working (the rest works and creates an FAData object) and returns this error: "Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘plotPed’ for signature ‘"character" ".
I thought it might be because of masked objects but specifying the package to use does not help.
Thank you for your help!