@@ -138,9 +138,9 @@ test_that(
138138 pgs <- seq(0 , 1 , length.out = nrow(phenotype.test.data $ phenotype.data ));
139139 phenotype.columns <- c(' continuous.phenotype' , ' binary.phenotype' );
140140 phenotype.data <- phenotype.test.data $ phenotype.data [ , phenotype.columns ];
141- phenotype.data $ binary.factor <- rep(c(' a' , ' b' ), 5 ); # should be included in the regression
142- phenotype.data $ categorical.phenotype <- rep(c(' a' , ' b' , ' c' , ' d' , ' e' ), 2 ); # should not be included in the regression
143- phenotype.data $ binary.factor <- rep(c(' a' , ' b' ), 5 );
141+ phenotype.data $ binary.factor <- c( rep(c(' a' , ' b' ), 5 ), ' a ' ); # should be included in the regression
142+ phenotype.data $ categorical.phenotype <- c( rep(c(' a' , ' b' , ' c' , ' d' , ' e' ), 2 ), ' f ' ); # should not be included in the regression
143+ phenotype.data $ binary.factor <- c( rep(c(' a' , ' b' ), 5 ), ' a ' );
144144
145145 # run function
146146 regression.data <- run.pgs.regression(pgs = pgs , phenotype.data = phenotype.data );
@@ -177,8 +177,8 @@ test_that(
177177 pgs <- seq(0 , 1 , length.out = nrow(phenotype.test.data $ phenotype.data ));
178178 phenotype.columns <- c(' continuous.phenotype' , ' binary.phenotype' );
179179 phenotype.data <- phenotype.test.data $ phenotype.data [ , phenotype.columns ];
180- phenotype.data $ binary.factor <- rep(c(' a' , ' b' ), 5 ); # should be included in the regression
181- phenotype.data $ categorical.phenotype <- rep(c(' a' , ' b' , ' c' , ' d' , ' e' ), 2 ); # should not be included in the regression
180+ phenotype.data $ binary.factor <- c( rep(c(' a' , ' b' ), 5 ), ' a ' ); # should be included in the regression
181+ phenotype.data $ categorical.phenotype <- c( rep(c(' a' , ' b' , ' c' , ' d' , ' e' ), 2 ), ' f ' ); # should not be included in the regression
182182
183183 # run function
184184 regression.data <- run.pgs.regression(pgs = pgs , phenotype.data = phenotype.data );
0 commit comments