@@ -237,11 +237,11 @@ test.data <- data.frame( # Changed to dot case
237237 Pheno.Binary.01 = factor (sample(c(0 , 1 ), 100 , replace = TRUE ), levels = c(0 , 1 )), # Changed to dot case
238238 Pheno.Binary.TF = factor (sample(c(FALSE , TRUE ), 100 , replace = TRUE ), levels = c(FALSE , TRUE )), # Changed to dot case
239239 Pheno.Binary.Numeric.01 = sample(c(0 , 1 ), 100 , replace = TRUE ), # Changed to dot case
240- Pheno.Binary.Char.YesNo = sample(c(" Yes" , " No " ), 100 , replace = TRUE ), # Changed to dot case
240+ Pheno.Binary.Char.YesNo = sample(c(' Yes' , ' No ' ), 100 , replace = TRUE ), # Changed to dot case
241241 Pheno.Binary.3Levels = factor (sample(c(0 , 1 , 2 ), 100 , replace = TRUE ), levels = c(0 ,1 ,2 )), # Changed to dot case
242242 Pheno.Continuous.Num = rnorm(100 , mean = 50 , sd = 10 ), # Changed to dot case
243243 Cov.Age = rnorm(100 , mean = 40 , sd = 10 ), # Changed to dot case
244- Cov.Sex = factor (sample(c(" M " , " F " ), 100 , replace = TRUE )), # Changed to dot case
244+ Cov.Sex = factor (sample(c(' M ' , ' F ' ), 100 , replace = TRUE )), # Changed to dot case
245245 NonNumericPGS = as.character(rnorm(100 )), # Changed to dot case
246246 stringsAsFactors = FALSE
247247 );
@@ -455,7 +455,7 @@ test_that(
455455 # Test 13: Too many PGS columns for default.colours (if 'scales' is NOT installed)
456456 # This test is conditional on 'scales' package availability.
457457 # If 'scales' is installed, this test will be skipped.
458- if (isFALSE(requireNamespace(" scales" , quietly = TRUE ))) {
458+ if (isFALSE(requireNamespace(' scales' , quietly = TRUE ))) {
459459 many.pgs.data <- data.frame (
460460 ID = 1 : 10 ,
461461 Pheno.Binary.01 = factor (sample(c(0 ,1 ), 10 , replace = TRUE ), levels = c(0 ,1 ))
@@ -470,7 +470,7 @@ test_that(
470470 phenotype.columns = ' Pheno.Binary.01' ,
471471 phenotype.type = ' binary' ,
472472 output.dir = temp.output.dir ,
473- filename.prefix = " test"
473+ filename.prefix = ' test'
474474 ),
475475 ' Too many PGS columns selected, default.colours supports 12 or fewer.'
476476 );
@@ -483,7 +483,7 @@ test_that(
483483 test.data.no.complete.cases <- data.frame (
484484 ID = 1 : 10 ,
485485 PGS.A = c(rnorm(2 ), rep(NA , 8 )), # Mostly NA
486- Pheno.Binary.01 = factor (c(rep(NA , 8 ), sample(c(0 ,1 ), 2 , replace = TRUE )), levels = c(0 ,1 ))
486+ Pheno.Binary.01 = factor (c(rep(NA , 8 ), sample(c(0 ,1 ), 2 , replace = TRUE )), levels = c(0 ,1 ))
487487 );
488488 expect_warning(
489489 results <- analyze.pgs.binary.predictiveness(
@@ -502,7 +502,7 @@ test_that(
502502 test.data.bad.glm <- data.frame (
503503 ID = 1 : 10 ,
504504 PGS.A = rep(1 , 10 ), # No variance in PGS
505- Pheno.Binary.01 = factor (sample(c(0 ,1 ), 10 , replace = TRUE ), levels = c(0 ,1 ))
505+ Pheno.Binary.01 = factor (sample(c(0 ,1 ), 10 , replace = TRUE ), levels = c(0 ,1 ))
506506 );
507507 expect_warning(
508508 results <- analyze.pgs.binary.predictiveness(
@@ -522,7 +522,7 @@ test_that(
522522 test.data.bad.roc <- data.frame (
523523 ID = 1 : 10 ,
524524 PGS.A = rnorm(10 ),
525- Pheno.Binary.01 = factor (rep(0 , 10 ), levels = c(0 ,1 )) # All phenotype values are 0
525+ Pheno.Binary.01 = factor (rep(0 , 10 ), levels = c(0 , 1 )) # All phenotype values are 0
526526 );
527527 expect_warning(
528528 results <- analyze.pgs.binary.predictiveness(
0 commit comments