Skip to content

Commit 34b3cb2

Browse files
committed
Fixed dependency break on scales (default behaviour in hue_pal raises
error now)
1 parent 400866f commit 34b3cb2

File tree

4 files changed

+43
-35
lines changed

4 files changed

+43
-35
lines changed

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Package: roahd
22
Type: Package
33
Title: Robust Analysis of High Dimensional Data
4-
Version: 1.4
5-
Date: 2018-04-11
4+
Version: 1.4.1
5+
Date: 2018-08-18
66
Authors@R: c( person("Nicholas", "Tarabelloni", role = c("aut", "cre"),
77
email = "[email protected]"),
88
person("Ana", "Arribas-Gil", role = "aut",

NEWS.md

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,37 +6,15 @@ Here's a list of what is changed in this update of __roahd__:
66

77
#### Major upgrades
88

9-
1) Extended Spearman's correlation coefficient computation for multivariate datasets with more than two
10-
components.
11-
12-
2) Added bootstrap-based computation of Spearman's correlation coefficient bias and standard deviation.
13-
14-
3) Added methods to provide bootstrap-based confidence intervals on Spearman's coefficients for two
15-
univariate functional datasets or a multivairate functional dataset.
16-
17-
4) Added a bootstrap-based test on Spearman's correlation coefficient for two multivariate functional datasets.
18-
19-
5) Added an outliergram version (without graphical display of original data) of multivariate functional datasets.
20-
21-
6) Added example multivariate functional datasets of ECG signals.
22-
239
#### Minor updates
2410

25-
1) Added two convenience functions to append compatible functional datasets (univariate or multivariate).
26-
27-
2) Added a [-operator overload for multivariate functional dataset representation __mfData__.
28-
29-
3011
### Fixes
3112

32-
#### Major fixes
13+
Fixed dependency error on a new version of `scales` package that breaks the use of multivariate fbplot in the corner-case of zero
14+
outliers.
3315

34-
1) Fixed bug in cor_spearman function. Now the standard spearman correlation is not computed on ranks of MHI/MEI, but on
35-
MHI/MEI itself. The difference is very small, but allows for full reproducibility of the results in the original paper.
16+
#### Major fixes
3617

3718
#### Minor fixes
3819

39-
1) Fixed typos in doc
40-
41-
2) Standardised formulas for the application of F inflations in outliergram and boxplot
4220

R/fbplot.R

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -352,8 +352,15 @@ fbplot.fData = function( Data,
352352

353353
col_non_outlying = set_alpha( col_non_outlying, 0.5 )
354354

355-
col_outlying = scales::hue_pal( h = c( - 90, 180 ),
356-
c = 150 )( length( ID_out ) )
355+
if( length( ID_out ) > 0 )
356+
{
357+
col_outlying = scales::hue_pal( h = c( - 90, 180 ),
358+
c = 150 )( length( ID_out ) )
359+
} else {
360+
col_outlying = scales::hue_pal( h = c( - 90, 180 ),
361+
c = 150 )( 1 )
362+
}
363+
357364
col_envelope = set_alpha( 'blue', alpha = 0.4 )
358365
col_center = set_alpha( 'blue', alpha = 1 )
359366
col_fence_structure = 'darkblue'
@@ -568,8 +575,15 @@ provided in the multivariate version of the functional boxplot' )
568575

569576
col_non_outlying = set_alpha( col_non_outlying, 0.5 )
570577

571-
col_outlying = scales::hue_pal( h = c( - 90, 180 ),
572-
c = 150 )( length( ID_out ) )
578+
if( length( ID_out ) > 0 )
579+
{
580+
col_outlying = scales::hue_pal( h = c( - 90, 180 ),
581+
c = 150 )( length( ID_out ) )
582+
} else {
583+
col_outlying = scales::hue_pal( h = c( - 90, 180 ),
584+
c = 150 )( 1 )
585+
}
586+
573587
col_envelope = set_alpha( 'blue', alpha = 0.4 )
574588
col_center = set_alpha( 'blue', alpha = 1 )
575589
col_fence_structure = 'darkblue'

R/outliergram.R

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,17 @@ outliergram = function( fData, MBD_data = NULL, MEI_data = NULL, p_check = 0.05,
295295

296296
col_non_outlying = set_alpha( col_non_outlying, 0.5 )
297297

298-
col_outlying = scales::hue_pal( h = c( - 90, 180 ),
299-
c = 150 )( length( out$ID_SO ) )
298+
if( length( out$ID_SO ) > 0 )
299+
{
300+
col_outlying = scales::hue_pal( h = c( - 90, 180 ),
301+
c = 150 )( length( out$ID_SO ) )
302+
303+
} else
304+
{
305+
col_outlying = scales::hue_pal( h = c( - 90, 180 ),
306+
c = 150 )( 1 )
307+
308+
}
300309

301310
dev.cur()
302311
par( mfrow = c( 1, 2 ) )
@@ -613,8 +622,15 @@ multivariate_outliergram = function( mfData,
613622

614623
col_non_outlying = set_alpha( col_non_outlying, 0.5 )
615624

616-
col_outlying = scales::hue_pal( h = c( - 90, 180 ),
617-
c = 150 )( length( out$ID_SO ) )
625+
if( length( out$ID_SO ) > 0 )
626+
{
627+
col_outlying = scales::hue_pal( h = c( - 90, 180 ),
628+
c = 150 )( length( out$ID_SO ) )
629+
630+
} else {
631+
col_outlying = scales::hue_pal( h = c( - 90, 180 ),
632+
c = 150 )( 1 )
633+
}
618634

619635
dev.cur()
620636
# Plotting outliergram

0 commit comments

Comments
 (0)