Skip to content

Commit 063d770

Browse files
committed
Styler
1 parent 0bd10e5 commit 063d770

File tree

6 files changed

+42
-45
lines changed

6 files changed

+42
-45
lines changed

R/utilities-plots.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,12 @@ getPlotConfigurationFromPlan <- function(plotProperties, plotType = NULL, legend
206206
}
207207
width <- ifNotNull(
208208
plotProperties$FontAndSize$ChartWidth,
209-
plotProperties$FontAndSize$ChartWidth/reEnv$defaultPlotFormat$dpi,
209+
plotProperties$FontAndSize$ChartWidth / reEnv$defaultPlotFormat$dpi,
210210
defaultWidth
211211
)
212212
height <- ifNotNull(
213213
plotProperties$FontAndSize$ChartHeight,
214-
plotProperties$FontAndSize$ChartHeight/reEnv$defaultPlotFormat$dpi,
214+
plotProperties$FontAndSize$ChartHeight / reEnv$defaultPlotFormat$dpi,
215215
defaultHeight
216216
)
217217
# Get dimensions of exported based on legend position and default/specific plot properties

R/utilities-reportingengine-env.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ setDefaultPlotFormat <- function(format = NULL, width = NULL, height = NULL, uni
3030
# add legend space to plot dimensions does not support pixels as units
3131
if (isIncluded(units, "px")) {
3232
units <- "in"
33-
reEnv$defaultPlotFormat$width <- reEnv$defaultPlotFormat$width/reEnv$defaultPlotFormat$dpi
34-
reEnv$defaultPlotFormat$height <- reEnv$defaultPlotFormat$height/reEnv$defaultPlotFormat$dpi
33+
reEnv$defaultPlotFormat$width <- reEnv$defaultPlotFormat$width / reEnv$defaultPlotFormat$dpi
34+
reEnv$defaultPlotFormat$height <- reEnv$defaultPlotFormat$height / reEnv$defaultPlotFormat$dpi
3535
}
3636
reEnv$defaultPlotFormat$units <- units %||% reEnv$defaultPlotFormat$units
3737
tlf::setDefaultExportParameters(

tests/dev/script-template-user-defined-function.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ plotAUCRatios <- function(structureSets,
7676
workflowType = PopulationWorkflowTypes$parallelComparison,
7777
xParameters,
7878
yParameters) {
79-
8079
# Recover the PK parameters from calculatePKParameters task
8180
pkParametersAcrossPopulations <- getPkParametersAcrossPopulations(structureSets)
8281
pkParametersDataAcrossPopulations <- pkParametersAcrossPopulations$data

tests/testthat/test-gof.R

Lines changed: 36 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,49 @@
11
# GOF MetaData are lists the fields defined below
22
testMetaDataA <- list(
3-
Time = list(dimension = "Time", unit = "h"),
4-
Concentration = list(dimension = "Concentration (mass)", unit = "mg/L"),
5-
Path = "Test|Path|A",
6-
legend = "Test Legend A",
7-
residualsLegend = "Test Residuals Legend A",
8-
residualScale = ResidualScales$Logarithmic,
9-
group = "Group 1",
10-
color = "red",
11-
fill = "red"
3+
Time = list(dimension = "Time", unit = "h"),
4+
Concentration = list(dimension = "Concentration (mass)", unit = "mg/L"),
5+
Path = "Test|Path|A",
6+
legend = "Test Legend A",
7+
residualsLegend = "Test Residuals Legend A",
8+
residualScale = ResidualScales$Logarithmic,
9+
group = "Group 1",
10+
color = "red",
11+
fill = "red"
1212
)
1313
testMetaDataB <- list(
14-
Time = list(dimension = "Time", unit = "h"),
15-
Concentration = list(dimension = "Concentration (mass)", unit = "mg/L"),
16-
Path = "Test|Path|B",
17-
legend = "Test Legend B",
18-
residualsLegend = "Test Residuals Legend B",
19-
residualScale = ResidualScales$Logarithmic,
20-
group = "Group 1",
21-
color = "blue",
22-
fill = "blue"
14+
Time = list(dimension = "Time", unit = "h"),
15+
Concentration = list(dimension = "Concentration (mass)", unit = "mg/L"),
16+
Path = "Test|Path|B",
17+
legend = "Test Legend B",
18+
residualsLegend = "Test Residuals Legend B",
19+
residualScale = ResidualScales$Logarithmic,
20+
group = "Group 1",
21+
color = "blue",
22+
fill = "blue"
2323
)
2424
# Group C: different residuals scale
2525
testMetaDataC <- list(
26-
Time = list(dimension = "Time", unit = "h"),
27-
Concentration = list(dimension = "Concentration (mass)", unit = "mg/L"),
28-
Path = "Test|Path|C",
29-
legend = "Test Legend C",
30-
residualsLegend = "Test Residuals Legend C",
31-
residualScale = ResidualScales$Linear,
32-
group = "Group 1",
33-
color = "green",
34-
fill = "green"
26+
Time = list(dimension = "Time", unit = "h"),
27+
Concentration = list(dimension = "Concentration (mass)", unit = "mg/L"),
28+
Path = "Test|Path|C",
29+
legend = "Test Legend C",
30+
residualsLegend = "Test Residuals Legend C",
31+
residualScale = ResidualScales$Linear,
32+
group = "Group 1",
33+
color = "green",
34+
fill = "green"
3535
)
3636
# Group D: different dimension/unit
3737
testMetaDataD <- list(
38-
Time = list(dimension = "Time", unit = "h"),
39-
Concentration = list(dimension = "Fraction", unit = ""),
40-
Path = "Test|Path|D",
41-
legend = "Test Legend D",
42-
residualsLegend = "Test Residuals Legend D",
43-
residualScale = ResidualScales$Logarithmic,
44-
group = "Group 1",
45-
color = "yellow",
46-
fill = "yellow"
38+
Time = list(dimension = "Time", unit = "h"),
39+
Concentration = list(dimension = "Fraction", unit = ""),
40+
Path = "Test|Path|D",
41+
legend = "Test Legend D",
42+
residualsLegend = "Test Residuals Legend D",
43+
residualScale = ResidualScales$Logarithmic,
44+
group = "Group 1",
45+
color = "yellow",
46+
fill = "yellow"
4747
)
4848
# Group D: different dimension/unit, scale and group
4949
testMetaDataE <- list(
@@ -87,5 +87,3 @@ test_that("getOutputGroups warns appropriately about meta data consistency withi
8787
expect_warning(ospsuite.reportingengine:::getOutputGroups(unitMetaDataFrame))
8888
expect_warning(ospsuite.reportingengine:::getOutputGroups(scaleMetaDataFrame))
8989
})
90-
91-

tests/testthat/test-lloq.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ defineExpectedTimeProfileData <- parse(text = paste0(
3232
c("All-Obs", "lloq", "All-Obs"), '-timeProfileData.csv")'
3333
))
3434
defineExpectedResidualsData <- parse(text = paste0(
35-
"expectedResidualsData", scenarios, ' <- getTestDataFilePath("mean-gof/',
35+
"expectedResidualsData", scenarios, ' <- getTestDataFilePath("mean-gof/',
3636
c("All-Obs", "lloq", "All-Obs"), '-residuals.csv")'
3737
))
3838

tests/testthat/test-observed-data.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ test_that("readObservedDataFile: throws an error for unexistant files", {
5656
test_that("readObservedDataFile throws an error for non UTF-8 files", {
5757
expect_error(
5858
readObservedDataFile(getTestDataFilePath("input-data/non-utf8.txt"))
59-
)
59+
)
6060
})
6161

6262
test_that("readObservedDataFile throw an error if columns are inconsistent", {

0 commit comments

Comments
 (0)