Plotting problem in 1.9.1.
Closed this issue · 1 comments
magnusdv commented
The following pedigrees plot nicely with the CRAN version (1.8.5) but not with the current dev version (1.9.1):
Version 1.8.5 (good)
library(kinship2, quietly = T)
packageVersion("kinship2")
#> [1] '1.8.5'
x1 = pedigree(id = 1:4, dad = c(0,0,1,3), mom = c(0,0,2,2), sex = c(1,2,1,1))
x2 = pedigree(id = 1:7, dad = c(0,0,1,1,1,1,3), mom = c(0,0,2,2,2,2,2),
sex = c(1,2,1,1,1,1,1))
par(mfrow = c(1,2))
plot(x1, mar = c(1,2,1,2))
plot(x2, mar = c(1,2,1,2))
Created on 2022-09-21 with reprex v2.0.2
Version 1.9.1 (bad)
library(kinship2, quietly = T)
packageVersion("kinship2")
#> [1] '1.9.1'
The first plots badly:
plot(x1)
The second does not plot at all:
plot(x2)
#> Error in myid[i, rval$nid[i, ] > 0] <- cumsum(c(0, rval$n))[i] + 1:rval$n[i]: number of items to replace is not a multiple of replacement length
Created on 2022-09-21 with reprex v2.0.2
I'm pretty sure the error lies in kindepth(..., align = TRUE)
which gives different outputs in the two versions.
sinnweja commented
Thanks, I'm making updates to the github version and preparing for an update to CRAN soon. I'll check this one before I upload, and make sure I did not break anything in 1.9.1.
From: Magnus Dehli Vigeland ***@***.***>
Sent: Wednesday, September 21, 2022 6:55 AM
To: mayoverse/kinship2 ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [EXTERNAL] [mayoverse/kinship2] Plotting problem in 1.9.1. (Issue #11)
The following pedigrees plot nicely with the CRAN version (1.8.5) but not with the current dev version (1.9.1):
Version 1.8.5 (good)
library(kinship2, quietly = T)
packageVersion("kinship2")
#> [1] '1.8.5'
x1 = pedigree(id = 1:4, dad = c(0,0,1,3), mom = c(0,0,2,2), sex = c(1,2,1,1))
x2 = pedigree(id = 1:7, dad = c(0,0,1,1,1,1,3), mom = c(0,0,2,2,2,2,2),
sex = c(1,2,1,1,1,1,1))
par(mfrow = c(1,2))
plot(x1, mar = c(1,2,1,2))
plot(x2, mar = c(1,2,1,2))
[https://camo.githubusercontent.com/499cce94fd859e7414c9b493c3a3a3b039424320544d2cb2c6b43a516137f002/68747470733a2f2f692e696d6775722e636f6d2f356639557747612e706e67]<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcamo.githubusercontent.com%2F499cce94fd859e7414c9b493c3a3a3b039424320544d2cb2c6b43a516137f002%2F68747470733a2f2f692e696d6775722e636f6d2f356639557747612e706e67&data=05%7C01%7CSinnwell.Jason%40mayo.edu%7Cd79d03483e464646ad1008da9bc820a1%7Ca25fff9c3f634fb29a8ad9bdd0321f9a%7C0%7C0%7C637993581087316792%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=YVNe7ymzj0QKc5D08VRdUV5cADkAbQ%2BGpRbpiUGdQC8%3D&reserved=0>
Created on 2022-09-21 with reprex v2.0.2<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Freprex.tidyverse.org%2F&data=05%7C01%7CSinnwell.Jason%40mayo.edu%7Cd79d03483e464646ad1008da9bc820a1%7Ca25fff9c3f634fb29a8ad9bdd0321f9a%7C0%7C0%7C637993581087316792%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=8VDREe9AB8X%2FB7NehKZJWe6aQ3MlMA2X6sTNTGhO1ho%3D&reserved=0>
Version 1.9.1 (bad)
library(kinship2, quietly = T)
packageVersion("kinship2")
#> [1] '1.9.1'
The first plots badly:
plot(x1)
[https://camo.githubusercontent.com/27225e3b77f62da540ed292c0a7ae4bd20bf3b3afe7e05aec980c17ea5874ab5/68747470733a2f2f692e696d6775722e636f6d2f445a6c476e66472e706e67]<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcamo.githubusercontent.com%2F27225e3b77f62da540ed292c0a7ae4bd20bf3b3afe7e05aec980c17ea5874ab5%2F68747470733a2f2f692e696d6775722e636f6d2f445a6c476e66472e706e67&data=05%7C01%7CSinnwell.Jason%40mayo.edu%7Cd79d03483e464646ad1008da9bc820a1%7Ca25fff9c3f634fb29a8ad9bdd0321f9a%7C0%7C0%7C637993581087316792%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=T4DsfoTL%2BVhWFFOm0dYlWuydiCwKR30XbPp2ccUT1GA%3D&reserved=0>
The second does not plot at all:
plot(x2)
#> Error in myid[i, rval$nid[i, ] > 0] <- cumsum(c(0, rval$n))[i] + 1:rval$n[i]: number of items to replace is not a multiple of replacement length
Created on 2022-09-21 with reprex v2.0.2<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Freprex.tidyverse.org%2F&data=05%7C01%7CSinnwell.Jason%40mayo.edu%7Cd79d03483e464646ad1008da9bc820a1%7Ca25fff9c3f634fb29a8ad9bdd0321f9a%7C0%7C0%7C637993581087316792%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=8VDREe9AB8X%2FB7NehKZJWe6aQ3MlMA2X6sTNTGhO1ho%3D&reserved=0>
I'm pretty sure the error lies in kindepth(..., align = TRUE) which gives different outputs in the two versions.
-
Reply to this email directly, view it on GitHub<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmayoverse%2Fkinship2%2Fissues%2F11&data=05%7C01%7CSinnwell.Jason%40mayo.edu%7Cd79d03483e464646ad1008da9bc820a1%7Ca25fff9c3f634fb29a8ad9bdd0321f9a%7C0%7C0%7C637993581087316792%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=8dodo0z7G261Uunao4L0lc5YApyEFcfGUlixwcn%2FJ%2FA%3D&reserved=0>, or unsubscribe<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAB574QF45OP6SX5EEVWOVDTV7LZRNANCNFSM6AAAAAAQR7YPSQ&data=05%7C01%7CSinnwell.Jason%40mayo.edu%7Cd79d03483e464646ad1008da9bc820a1%7Ca25fff9c3f634fb29a8ad9bdd0321f9a%7C0%7C0%7C637993581087316792%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=l%2FyJxMVqtwCPQFfpvEM7BeubX5t%2BqYU4%2BsCKU7X6620%3D&reserved=0>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.******@***.***>>