Skip to content

Commit

Permalink
Fixed CRAN error; bump to 1.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
magnusdv committed Feb 25, 2022
1 parent 753d7f2 commit 36aebc5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: forrel
Title: Forensic Pedigree Analysis and Relatedness Inference
Version: 1.4.0
Version: 1.4.1
Authors@R: c(
person("Magnus Dehli", "Vigeland", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-9134-4962")),
Expand Down
6 changes: 3 additions & 3 deletions R/familias2ped.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@
Familias2ped = function(familiasped, datamatrix, loci, matchLoci = FALSE) {

### If first argument is a list of FamiliasPedigrees, convert one at a time.
if (is.list(familiasped) && class(familiasped[[1]]) == "FamiliasPedigree") {
if (is.list(familiasped) && inherits(familiasped[[1]], "FamiliasPedigree")) {
res = lapply(familiasped, function(p)
Familias2ped(p, datamatrix = datamatrix, loci = loci, matchLoci = matchLoci))
return(res)
}
else if(class(familiasped) != "FamiliasPedigree")
else if(!inherits(familiasped, "FamiliasPedigree"))
stop2("The first argument must be a `FamiliasPedigree` or a list of such")


Expand Down Expand Up @@ -157,7 +157,7 @@ Familias2ped = function(familiasped, datamatrix, loci, matchLoci = FALSE) {
readFamiliasLoci = function(loci) {
if (is.null(loci))
return(NULL)
if (class(loci) == "FamiliasLocus")
if (inherits(loci, "FamiliasLocus"))
loci = list(loci)

lapply(loci, function(a) {
Expand Down

0 comments on commit 36aebc5

Please sign in to comment.