aboutsummaryrefslogtreecommitdiff
path: root/scripts/calculate_biweight.R
diff options
context:
space:
mode:
authorBonfaceKilz2021-06-23 14:07:52 +0300
committerGitHub2021-06-23 14:07:52 +0300
commita45f1fd15a5adfab1f284af15349175b7f765296 (patch)
tree9beb98989133c8ef87ab0cde33a9773b8298cac2 /scripts/calculate_biweight.R
parent3cc3cf68c2dcbdc2cd496f8e2728a59fbb6614e6 (diff)
parent7b602a681dc3fefbe322037545d07389ef194920 (diff)
downloadgenenetwork3-a45f1fd15a5adfab1f284af15349175b7f765296.tar.gz
Merge pull request #21 from genenetwork/fix/biweight-errors
Fix/biweight errors
Diffstat (limited to 'scripts/calculate_biweight.R')
-rw-r--r--scripts/calculate_biweight.R5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/calculate_biweight.R b/scripts/calculate_biweight.R
index bad93cb..8d8366e 100644
--- a/scripts/calculate_biweight.R
+++ b/scripts/calculate_biweight.R
@@ -13,7 +13,7 @@ ParseArgs <- function(args){
}
BiweightMidCorrelation <- function(trait_val,target_val){
- results <- bicorAndPvalue(c(trait_val),c(target_val))
+ results <-bicorAndPvalue(as.numeric(unlist(trait_val)),as.numeric(unlist(target_val)))
return ((c(c(results$bicor)[1],c(results$p)[1])))
}
@@ -39,4 +39,5 @@ test_that("parsing args "),{
parsed_values <- ParseArgs(arg_values)
-cat((BiweightMidCorrelation(parsed_values[1],parsed_values[2]))) \ No newline at end of file
+
+cat(BiweightMidCorrelation(parsed_values[1],parsed_values[2])) \ No newline at end of file