Skip to content

Commit 03f4fda

Browse files
committed
Remove updateEquationMap function
1 parent 9521d23 commit 03f4fda

File tree

1 file changed

+0
-62
lines changed
  • Late adults stats pipeline/DRrequiredAgeing/DRrequiredAgeingPackage/R

1 file changed

+0
-62
lines changed

Late adults stats pipeline/DRrequiredAgeing/DRrequiredAgeingPackage/R/sideFunctions.R

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -4009,64 +4009,6 @@ requiredDataColumns = function(x){
40094009
return(ColumnsList)
40104010
}
40114011

4012-
updateEquationMap = function(updatePackage = TRUE) {
4013-
# Extract Centers name from the skip list
4014-
metapars = read.csv(file = file.path(local(), 'metadataParameters.csv'))
4015-
centers = lapply(strsplit(
4016-
metapars$parameter_stable_id,
4017-
split = '_',
4018-
fixed = TRUE
4019-
), function(x) {
4020-
return (x[1])
4021-
})
4022-
centers = unique(unlist(centers))
4023-
4024-
# Extract parameters from the method map
4025-
methodmap = readConf('EquationMap.conf')
4026-
orgparsColon = paste(names(methodmap), methodmap, sep = ':')
4027-
orgpars = paste(names(methodmap), methodmap, sep = '_')
4028-
parameters = lapply(strsplit(orgpars,
4029-
split = '_',
4030-
fixed = TRUE), function(x) {
4031-
if (length(x) <= 5) {
4032-
r = c()
4033-
for (i in 1:6) {
4034-
y = x
4035-
y[length(y) - 1] = paste(paste0('00', i, collapse = ''), y[length(y)], sep=':',collapse = ':')
4036-
r = c(r, paste(y[-c(1,length(y))], sep = '_', collapse = '_'))
4037-
}
4038-
return (r)
4039-
} else{
4040-
return(NULL)
4041-
}
4042-
})
4043-
parameters = unlist(parameters)
4044-
4045-
#combine two lists
4046-
#r = apply(expand.grid(centers, parameters), 1, paste, collapse = "_")
4047-
r = as.vector(outer(centers, parameters, paste, sep="_"))
4048-
r = unique(c(orgparsColon, sort(r)))
4049-
if (updatePackage) {
4050-
write.table(
4051-
r,
4052-
file = system.file("extdata", "EquationMap.conf", package = "DRrequiredAgeing"),
4053-
row.names = FALSE,
4054-
col.names = FALSE,
4055-
quote = FALSE
4056-
)
4057-
} else{
4058-
write.table(
4059-
r,
4060-
file = file.path(getwd(), "EquationMap.conf"),
4061-
row.names = FALSE,
4062-
col.names = FALSE,
4063-
quote = FALSE
4064-
)
4065-
}
4066-
gc()
4067-
return(invisible(r))
4068-
}
4069-
40704012
updateMethodMap = function(updatePackage = TRUE) {
40714013
# Extract Centers name from the skip list
40724014
metapars = read.csv(file = file.path(local(), 'metadataParameters.csv'))
@@ -4242,10 +4184,6 @@ updateImpress = function(updateImpressFileInThePackage = FALSE,
42424184
updateMethodMap(updateImpressFileInThePackage)
42434185
}
42444186
###################################################
4245-
if(updateEquationMapHuristic){
4246-
updateEquationMap(updateImpressFileInThePackage)
4247-
}
4248-
###################################################
42494187
return(invisible(list(
42504188
categories = outP, dfObject = df
42514189
)))

0 commit comments

Comments
 (0)