David-Hervas / clickR
Showing 1 of 3 files from the diff.
Other files ignored by Codecov
NEWS has changed.
DESCRIPTION has changed.

@@ -494,9 +494,23 @@
Loading
494 494
  previous.NA<- sapply(x, function(x) sum(is.na(x)))
495 495
  candidate_variables <- apply(sapply(x, function(x) grepl("[0-9]", as.character(x))), 2, any) & sapply(x, function(x) !(is.numeric(x) | inherits(x, 'Date'))) & sapply(x, function(x) length(unique(x))>=k)
496 496
  percent_variables <- apply(sapply(x, function(x) grepl("%", as.character(x))), 2, any)
497 +
  thousand_separators <- apply(sapply(x, function(x) grepl(".\\..{3},", x) | grepl(".,.{3}\\.", x) | grepl(".\\..{3}\\.", x) | grepl(".\\,.{3}\\,", x)), 2, any)
497 498
  x[, candidate_variables & percent_variables] <- lapply(x[, candidate_variables & percent_variables, drop=FALSE], function(x){
498 499
    x[grepl("%", x)] <- numeros(gsub("%", "", x[grepl("%", x)]))/100
499 500
    x})
501 +
  x[, thousand_separators & candidate_variables] <- lapply(x[, candidate_variables & thousand_separators, drop=FALSE], function(x){
502 +
    point_thousands <- sum(grepl("\\..*,", x) | grepl("\\..{3}\\.", x))
503 +
    comma_thousands <- sum(grepl(",.*\\.", x) | grepl(",.{3},", x))
504 +
    if(point_thousands > comma_thousands){
505 +
      x[grepl("\\.", x) & (!(grepl("\\..{3}$", x) | grepl("\\..{3},", x)) | grepl(",.*\\.", x))] <- NA
506 +
      x <- gsub("\\.", "", x)
507 +
    }
508 +
    if(comma_thousands > point_thousands){
509 +
      x[grepl(",", x) & (!(grepl(",.{3}$", x) | grepl(",.{3}.", x)) | grepl("\\..*,", x))] <- NA
510 +
      x <- gsub(",", "", x)
511 +
    }
512 +
    x
513 +
  })
500 514
  x[, candidate_variables] <- lapply(x[, candidate_variables, drop=FALSE], function(x) numeros(x))
501 515
  final.NA<-sapply(x, function(x) sum(is.na(x)))-previous.NA
502 516
  x[,(final.NA-previous.NA) > nrow(x)*max.NA] <- old[,(final.NA-previous.NA) > nrow(x)*max.NA]
Files Coverage
R 0.00%
Project Totals (4 files) 0.00%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading