Skip to content

Problem Rounding Up  #24

@EvmARodCur

Description

@EvmARodCur

When trying to use the round suppress, it sometimes rounds with a very big negative objective value. To show this, using the r code "test_code"

`
###fill
test<-read.table(file="CSV_CODIF.csv" , sep="\t", header=TRUE)
###fill

names <-colnames(test)

tot_code<-c("C1_1","C2_1","C3_1","C4_1")
dirname <-"tauargus_files"
filename <-"ex1"
dir_temp<-paste("/",dirname,"/",filename,".csv",sep="")

###fill
file_hrc=c("U:/anonimizacion/r tau argus/comprobacion/tabla_a_codificar/hrc_C1.hrc")
###fill

list_hrc<-setNames(file_hrc,"C1")

library(rtauargus)

###fill
loc_tauargus<-"C:/Users/ext-arodcur/Desktop/TauArgus4.2.4b2/TauArgus4.2.4b2/TauArgus.exe"
###fill

options(rtauargus.tauargus_exe = loc_tauargus)

ex1<- tab_rtauargus(
test,
dir_name = dirname,
files_name = filename,
explanatory_vars = names[-length(names)],
safety_rules = "FREQ(5,20)",
value= "OBS_VALUE",
freq = "OBS_VALUE",
totcode = tot_code,
suppress= "RND(1,5,0,1000,0)",
hrc=list_hrc,
verbose = TRUE,
)

###fill
test<-read.table(file="CSV_CODIF_2.csv" , sep="\t", header=TRUE)
###fill

names <-colnames(test)

tot_code<-c("C1_1","C2_1","C3_1","C4_1")
dirname <-"tauargus_files"
filename <-"ex1"
dir_temp<-paste("/",dirname,"/",filename,".csv",sep="")

file_hrc=c("hrc_C1.hrc")
list_hrc<-setNames(file_hrc,"C1")

ex1<- tab_rtauargus(
test,
dir_name = dirname,
files_name = filename,
explanatory_vars = names[-length(names)],
safety_rules = "FREQ(5,20)",
value= "OBS_VALUE",
freq = "OBS_VALUE",
totcode = tot_code,
suppress= "RND(1,5,0,1000,0)",
hrc=list_hrc,
verbose = TRUE,
)`

if we run the data from the csv CSV_CODIF
CSV_CODIF.csv

that has a hierarchy in the first column in the file hrc_C1 (must be changed to hrc format):
hrc_C1.csv

we get that negative objective value:
image
with rounded values far from the original values:
image
Meanwhile if we do the same with CSV_CODIF_2 that has the same columns and hierarchy but different values:

CSV_CODIF_2.csv

it doesnt happend:
image
Also, if we use Tau-Argus with the first file it turns out correct:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions