Skip to content

Commit

Permalink
UPDATE surveysd and error_estimation vignette
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolfgang Rannetbauer - QM committed Jul 29, 2020
1 parent 2c677a2 commit 1d815d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion vignettes/error_estimation.Rmd
Expand Up @@ -125,7 +125,7 @@ povertyRates <- calc.stError(dat2, var = "povertyRisk", fun = weightedRatio, gro
povertyRates$Estimates
```

The last column with `region = NA` denotes the aggregate over all regions. Note that the
The last row with `region = NA` denotes the aggregate over all regions. Note that the
columns `N` and `n` now show the weighted and unweighted number of persons in each region.

### Several grouping variables
Expand Down
2 changes: 1 addition & 1 deletion vignettes/surveysd.Rmd
Expand Up @@ -62,7 +62,7 @@ err.est$Estimates
```

The output contains estimates (`val_povertyRisk`) as well as standard errors (`stE_povertyRisk`)
measured in percent.
measured in percent. The rows with `gender = NA` denotes the aggregate over all genders for the corresponding year.

### Estimate with respect to several variables

Expand Down

1 comment on commit 1d815d0

@lintr-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

R/calc.stError.R:853:1: style: Lines should not be more than 80 characters.

var.est[, c("est", "ID") := tstrsplit(variable, "\\.(?=[^\\.]+$)", perl=TRUE)]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/calc.stError.R:853:76: style: Put spaces around all infix operators.

var.est[, c("est", "ID") := tstrsplit(variable, "\\.(?=[^\\.]+$)", perl=TRUE)]
                                                                          ~^~

R/draw.bootstrap.R:395:1: style: Trailing whitespace is superfluous.

^~

R/draw.bootstrap.R:397:6: style: Place a space before left parenthesis, except in a function call.

for(i in seq_along(strata)){
     ^

R/draw.bootstrap.R:397:29: style: There should be a space between right parenthesis and an opening curly brace.

for(i in seq_along(strata)){
                            ^~

R/draw.bootstrap.R:398:7: style: Place a space before left parenthesis, except in a function call.

if(!strata[i]%in%c("1","I") & !cluster[i]%in%c("1","I")){
      ^

R/draw.bootstrap.R:398:18: style: Put spaces around all infix operators.

if(!strata[i]%in%c("1","I") & !cluster[i]%in%c("1","I")){
                ~^~~~~

R/draw.bootstrap.R:398:28: style: Commas should always have a space after.

if(!strata[i]%in%c("1","I") & !cluster[i]%in%c("1","I")){
                           ^

R/draw.bootstrap.R:398:46: style: Put spaces around all infix operators.

if(!strata[i]%in%c("1","I") & !cluster[i]%in%c("1","I")){
                                            ~^~~~~

R/draw.bootstrap.R:398:56: style: Commas should always have a space after.

if(!strata[i]%in%c("1","I") & !cluster[i]%in%c("1","I")){
                                                       ^

R/draw.bootstrap.R:398:60: style: There should be a space between right parenthesis and an opening curly brace.

if(!strata[i]%in%c("1","I") & !cluster[i]%in%c("1","I")){
                                                           ^~

R/draw.bootstrap.R:399:1: style: Lines should not be more than 80 characters.

countMultiple <- dt.eval("dat[,uniqueN(",strata[i],"),by=c(cluster[i],period)][V1>1]")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/draw.bootstrap.R:399:48: style: Commas should always have a space after.

countMultiple <- dt.eval("dat[,uniqueN(",strata[i],"),by=c(cluster[i],period)][V1>1]")
                                               ^

R/draw.bootstrap.R:399:58: style: Commas should always have a space after.

countMultiple <- dt.eval("dat[,uniqueN(",strata[i],"),by=c(cluster[i],period)][V1>1]")
                                                         ^

R/draw.bootstrap.R:400:9: style: Place a space before left parenthesis, except in a function call.

if(nrow(countMultiple)>0){
        ^

R/draw.bootstrap.R:400:29: style: Put spaces around all infix operators.

if(nrow(countMultiple)>0){
                           ~^~

R/draw.bootstrap.R:400:31: style: There should be a space between right parenthesis and an opening curly brace.

if(nrow(countMultiple)>0){
                              ^~

R/draw.bootstrap.R:401:1: style: Lines should not be more than 80 characters.

​        stop("Some sampling units in ",cluster[i]," occur in multiple strata of ",strata[i])
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/draw.bootstrap.R:401:40: style: Commas should always have a space after.

​        stop("Some sampling units in ",cluster[i]," occur in multiple strata of ",strata[i])
                                       ^

R/draw.bootstrap.R:401:51: style: Commas should always have a space after.

​        stop("Some sampling units in ",cluster[i]," occur in multiple strata of ",strata[i])
                                                  ^

R/draw.bootstrap.R:401:83: style: Commas should always have a space after.

​        stop("Some sampling units in ",cluster[i]," occur in multiple strata of ",strata[i])
                                                                                  ^

R/draw.bootstrap.R:405:1: style: Trailing whitespace is superfluous.

^~

R/ipf.r:35:5: style: Place a space before left parenthesis, except in a function call.

if(!is.null(bound)){
    ^

R/ipf.r:35:21: style: There should be a space between right parenthesis and an opening curly brace.

if(!is.null(bound)){
                    ^~

R/ipf.r:43:5: style: Place a space before left parenthesis, except in a function call.

if(!is.null(minMaxTrim)){
    ^

R/ipf.r:43:26: style: There should be a space between right parenthesis and an opening curly brace.

if(!is.null(minMaxTrim)){
                         ^~

R/ipf.r:44:10: style: Put spaces around all infix operators.

g1[g1<minMaxTrim[1]] <- minMaxTrim[1]
        ~^~

R/ipf.r:45:10: style: Put spaces around all infix operators.

g1[g1>minMaxTrim[2]] <- minMaxTrim[2]
        ~^~

R/ipf.r:59:5: style: Place a space before left parenthesis, except in a function call.

if(!is.null(bound)){
    ^

R/ipf.r:59:21: style: There should be a space between right parenthesis and an opening curly brace.

if(!is.null(bound)){
                    ^~

R/ipf.r:65:5: style: Place a space before left parenthesis, except in a function call.

if(!is.null(minMaxTrim)){
    ^

R/ipf.r:65:26: style: There should be a space between right parenthesis and an opening curly brace.

if(!is.null(minMaxTrim)){
                         ^~

R/ipf.r:66:10: style: Put spaces around all infix operators.

g1[g1<minMaxTrim[1]] <- minMaxTrim[1]
        ~^~

R/ipf.r:67:10: style: Put spaces around all infix operators.

g1[g1>minMaxTrim[2]] <- minMaxTrim[2]
        ~^~

R/ipf.r:72:37: style: There should be a space between right parenthesis and an opening curly brace.

check_eps <- function(con, eps, type){
                                    ^~

R/ipf.r:74:5: style: Place a space before left parenthesis, except in a function call.

if(is.list(eps)){
    ^

R/ipf.r:74:18: style: There should be a space between right parenthesis and an opening curly brace.

if(is.list(eps)){
                 ^~

R/ipf.r:75:7: style: Place a space before left parenthesis, except in a function call.

if(length(eps)!=l){
      ^

R/ipf.r:75:19: style: Put spaces around all infix operators.

if(length(eps)!=l){
                 ~^~~

R/ipf.r:75:22: style: There should be a space between right parenthesis and an opening curly brace.

if(length(eps)!=l){
                     ^~

R/ipf.r:76:1: style: Lines should not be more than 80 characters.

​      stop(paste("Provided",type,"eps argument does not fit",type,"constraints."))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/ipf.r:76:29: style: Commas should always have a space after.

​      stop(paste("Provided",type,"eps argument does not fit",type,"constraints."))
                            ^

R/ipf.r:76:34: style: Commas should always have a space after.

​      stop(paste("Provided",type,"eps argument does not fit",type,"constraints."))
                                 ^

R/ipf.r:76:62: style: Commas should always have a space after.

​      stop(paste("Provided",type,"eps argument does not fit",type,"constraints."))
                                                             ^

R/ipf.r:76:67: style: Commas should always have a space after.

​      stop(paste("Provided",type,"eps argument does not fit",type,"constraints."))
                                                                  ^

R/ipf.r:78:8: style: Place a space before left parenthesis, except in a function call.

for(i in 1:length(eps)){
       ^

R/ipf.r:78:14: warning: Avoid 1:length(...) expressions, use seq_len.

for(i in 1:length(eps)){
             ^

R/ipf.r:78:27: style: There should be a space between right parenthesis and an opening curly brace.

for(i in 1:length(eps)){
                          ^~

R/ipf.r:79:9: style: Place a space before left parenthesis, except in a function call.

if(is.array(eps[[i]])){
        ^

R/ipf.r:79:28: style: There should be a space between right parenthesis and an opening curly brace.

if(is.array(eps[[i]])){
                           ^~

R/ipf.r:80:11: style: Place a space before left parenthesis, except in a function call.

if(!identical(dim(eps[[i]]),dim(con[[i]]))){
          ^

R/ipf.r:80:37: style: Commas should always have a space after.

if(!identical(dim(eps[[i]]),dim(con[[i]]))){
                                    ^

R/ipf.r:80:51: style: There should be a space between right parenthesis and an opening curly brace.

if(!identical(dim(eps[[i]]),dim(con[[i]]))){
                                                  ^~

R/ipf.r:81:1: style: Lines should not be more than 80 characters.

​          stop(paste("Provided",type,"eps argument",i,"does not fit in dimension to ",type,"constraints",i,"."))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/ipf.r:81:33: style: Commas should always have a space after.

​          stop(paste("Provided",type,"eps argument",i,"does not fit in dimension to ",type,"constraints",i,"."))
                                ^

R/ipf.r:81:38: style: Commas should always have a space after.

​          stop(paste("Provided",type,"eps argument",i,"does not fit in dimension to ",type,"constraints",i,"."))
                                     ^

R/ipf.r:81:53: style: Commas should always have a space after.

​          stop(paste("Provided",type,"eps argument",i,"does not fit in dimension to ",type,"constraints",i,"."))
                                                    ^

R/ipf.r:81:55: style: Commas should always have a space after.

​          stop(paste("Provided",type,"eps argument",i,"does not fit in dimension to ",type,"constraints",i,"."))
                                                      ^

R/ipf.r:81:87: style: Commas should always have a space after.

​          stop(paste("Provided",type,"eps argument",i,"does not fit in dimension to ",type,"constraints",i,"."))
                                                                                      ^

R/ipf.r:81:92: style: Commas should always have a space after.

​          stop(paste("Provided",type,"eps argument",i,"does not fit in dimension to ",type,"constraints",i,"."))
                                                                                           ^

R/ipf.r:81:106: style: Commas should always have a space after.

​          stop(paste("Provided",type,"eps argument",i,"does not fit in dimension to ",type,"constraints",i,"."))
                                                                                                         ^

R/ipf.r:81:108: style: Commas should always have a space after.

​          stop(paste("Provided",type,"eps argument",i,"does not fit in dimension to ",type,"constraints",i,"."))
                                                                                                           ^

R/ipf.r:85:11: style: Place a space before left parenthesis, except in a function call.

​  }else if(length(eps)>1){
          ^

R/ipf.r:85:23: style: Put spaces around all infix operators.

​  }else if(length(eps)>1){
                     ~^~

R/ipf.r:85:25: style: There should be a space between right parenthesis and an opening curly brace.

​  }else if(length(eps)>1){
                        ^~

R/ipf.r:86:1: style: Lines should not be more than 80 characters.

​    stop("Individual eps arguments for each constraints must be defined as list.")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/ipf.r:137:1: style: Lines should not be more than 80 characters.

numericalWeighting, numericalWeightingVar, w, cw, minMaxTrim) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/ipf.r:138:1: style: Lines should not be more than 80 characters.

selectGroupNotConverged <- epsPcur <- maxFac <- OriginalSortingVariable <- V1 <-
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/ipf.r:182:1: style: Lines should not be more than 80 characters.

dat[, selectGroupNotConverged := any(!is.na(fVariableForCalibrationIPF) &
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/ipf.r:183:1: style: Lines should not be more than 80 characters.

​                                               (abs(1 / fVariableForCalibrationIPF - 1) > epsPcur)), by= c(pColNames[[i]])]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/ipf.r:183:104: style: Put spaces around all infix operators.

​                                               (abs(1 / fVariableForCalibrationIPF - 1) > epsPcur)), by= c(pColNames[[i]])]
                                                                                                      ~^

R/ipf.r:227:1: style: Lines should not be more than 80 characters.

looseH, numericalWeighting, numericalWeightingVar, w, cw, minMaxTrim) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/ipf.r:587:5: style: Place a space before left parenthesis, except in a function call.

if(!is.null(minMaxTrim)){
    ^

R/ipf.r:587:26: style: There should be a space between right parenthesis and an opening curly brace.

if(!is.null(minMaxTrim)){
                         ^~

R/ipf.r:588:7: style: Place a space before left parenthesis, except in a function call.

if(length(minMaxTrim)!=2)
      ^

R/ipf.r:588:26: style: Put spaces around all infix operators.

if(length(minMaxTrim)!=2)
                        ~^~~

R/ipf.r:590:7: style: Place a space before left parenthesis, except in a function call.

if(!is.numeric(minMaxTrim)){
      ^

R/ipf.r:590:31: style: There should be a space between right parenthesis and an opening curly brace.

if(!is.numeric(minMaxTrim)){
                              ^~

R/ipf.r:593:7: style: Place a space before left parenthesis, except in a function call.

if(minMaxTrim[2]<minMaxTrim[1]){
      ^

R/ipf.r:593:21: style: Put spaces around all infix operators.

if(minMaxTrim[2]<minMaxTrim[1]){
                   ~^~

R/ipf.r:593:35: style: There should be a space between right parenthesis and an opening curly brace.

if(minMaxTrim[2]<minMaxTrim[1]){
                                  ^~

R/ipf.r:594:1: style: Lines should not be more than 80 characters.

​      stop("minMaxTrim must have a minimum as a first element and a maximum as a second element.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/ipf.r:628:1: style: Trailing whitespace is superfluous.

^~~~

R/ipf.r:629:7: style: Place a space before left parenthesis, except in a function call.

if(!hid%in%colnames(dat)){
      ^

R/ipf.r:629:12: style: Put spaces around all infix operators.

if(!hid%in%colnames(dat)){
          ~^~~~~

R/ipf.r:629:29: style: There should be a space between right parenthesis and an opening curly brace.

if(!hid%in%colnames(dat)){
                            ^~

R/ipf.r:630:43: style: Commas should always have a space after.

​      stop("dat does not contain column ",hid)
                                          ^

R/ipf.r:632:1: style: Trailing whitespace is superfluous.

^~~~

R/ipf.r:633:7: style: Place a space before left parenthesis, except in a function call.

if(any(is.na(dat[[hid]]))){
      ^

R/ipf.r:633:30: style: There should be a space between right parenthesis and an opening curly brace.

if(any(is.na(dat[[hid]]))){
                             ^~

R/ipf.r:636:1: style: Trailing whitespace is superfluous.

^~~~

R/kishFactor.R:11:1: style: Lines should not be more than 80 characters.

#' @details The factor is computed acording to 'Weighting for Unequal P_i', Leslie Kish, Journal of Official Statistics, Vol. 8. No. 2, 1992
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/recalib.R:214:5: style: Place a space before left parenthesis, except in a function call.

if(!is.null(names(conP))){
    ^

R/recalib.R:214:27: style: There should be a space between right parenthesis and an opening curly brace.

if(!is.null(names(conP))){
                          ^~

R/recalib.R:216:58: style: Put spaces around all infix operators.

conPnamesNumeric <- conPnamesNumeric[conPnamesNumeric!=""]
                                                        ~^~~

R/recalib.R:222:7: style: Place a space before left parenthesis, except in a function call.

if(!is.null(names(conH))){
      ^

R/recalib.R:222:29: style: There should be a space between right parenthesis and an opening curly brace.

if(!is.null(names(conH))){
                            ^~

R/recalib.R:224:60: style: Put spaces around all infix operators.

conHnamesNumeric <- conHnamesNumeric[conHnamesNumeric!=""]
                                                          ~^~~

R/rescaled.bootstrap.R:172:1: style: Trailing whitespace is superfluous.

^~~~

R/rescaled.bootstrap.R:174:8: style: Place a space before left parenthesis, except in a function call.

for(i in seq_along(strata)){
       ^

R/rescaled.bootstrap.R:174:31: style: There should be a space between right parenthesis and an opening curly brace.

for(i in seq_along(strata)){
                              ^~

R/rescaled.bootstrap.R:175:9: style: Place a space before left parenthesis, except in a function call.

if(!strata[i]%in%c("1","I") & !cluster[i]%in%c("1","I")){
        ^

R/rescaled.bootstrap.R:175:20: style: Put spaces around all infix operators.

if(!strata[i]%in%c("1","I") & !cluster[i]%in%c("1","I")){
                  ~^~~~~

R/rescaled.bootstrap.R:175:30: style: Commas should always have a space after.

if(!strata[i]%in%c("1","I") & !cluster[i]%in%c("1","I")){
                             ^

R/rescaled.bootstrap.R:175:48: style: Put spaces around all infix operators.

if(!strata[i]%in%c("1","I") & !cluster[i]%in%c("1","I")){
                                              ~^~~~~

R/rescaled.bootstrap.R:175:58: style: Commas should always have a space after.

if(!strata[i]%in%c("1","I") & !cluster[i]%in%c("1","I")){
                                                         ^

R/rescaled.bootstrap.R:175:62: style: There should be a space between right parenthesis and an opening curly brace.

if(!strata[i]%in%c("1","I") & !cluster[i]%in%c("1","I")){
                                                             ^~

R/rescaled.bootstrap.R:176:1: style: Lines should not be more than 80 characters.

countMultiple <- dt.eval("dat[,uniqueN(",strata[i],"),by=.(",cluster[i],")][V1>1]")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/rescaled.bootstrap.R:176:50: style: Commas should always have a space after.

countMultiple <- dt.eval("dat[,uniqueN(",strata[i],"),by=.(",cluster[i],")][V1>1]")
                                                 ^

R/rescaled.bootstrap.R:176:60: style: Commas should always have a space after.

countMultiple <- dt.eval("dat[,uniqueN(",strata[i],"),by=.(",cluster[i],")][V1>1]")
                                                           ^

R/rescaled.bootstrap.R:176:70: style: Commas should always have a space after.

countMultiple <- dt.eval("dat[,uniqueN(",strata[i],"),by=.(",cluster[i],")][V1>1]")
                                                                     ^

R/rescaled.bootstrap.R:176:81: style: Commas should always have a space after.

countMultiple <- dt.eval("dat[,uniqueN(",strata[i],"),by=.(",cluster[i],")][V1>1]")
                                                                                ^

R/rescaled.bootstrap.R:177:11: style: Place a space before left parenthesis, except in a function call.

if(nrow(countMultiple)>0){
          ^

R/rescaled.bootstrap.R:177:31: style: Put spaces around all infix operators.

if(nrow(countMultiple)>0){
                             ~^~

R/rescaled.bootstrap.R:177:33: style: There should be a space between right parenthesis and an opening curly brace.

if(nrow(countMultiple)>0){
                                ^~

R/rescaled.bootstrap.R:178:1: style: Lines should not be more than 80 characters.

​          stop("Some sampling units in ",cluster[i]," occur in multiple strata of ",strata[i])
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/rescaled.bootstrap.R:178:42: style: Commas should always have a space after.

​          stop("Some sampling units in ",cluster[i]," occur in multiple strata of ",strata[i])
                                         ^

R/rescaled.bootstrap.R:178:53: style: Commas should always have a space after.

​          stop("Some sampling units in ",cluster[i]," occur in multiple strata of ",strata[i])
                                                    ^

R/rescaled.bootstrap.R:178:85: style: Commas should always have a space after.

​          stop("Some sampling units in ",cluster[i]," occur in multiple strata of ",strata[i])
                                                                                    ^

R/rescaled.bootstrap.R:182:1: style: Trailing whitespace is superfluous.

^~~~

R/rescaled.bootstrap.R:247:34: style: Commas should always have a space after.

by.val.tail <- tail(by.val,1)
                                 ^

R/rescaled.bootstrap.R:264:1: style: Trailing whitespace is superfluous.

^~~~~~~~

R/rescaled.bootstrap.R:269:1: style: Trailing whitespace is superfluous.

^~~~~~~~

R/rescaled.bootstrap.R:272:11: style: Place a space before left parenthesis, except in a function call.

if(any(is.na(next.PSU[[new.var]]))){
          ^

R/rescaled.bootstrap.R:272:43: style: There should be a space between right parenthesis and an opening curly brace.

if(any(is.na(next.PSU[[new.var]]))){
                                          ^~

R/rescaled.bootstrap.R:273:13: style: Place a space before left parenthesis, except in a function call.

if(firstStage){
            ^

R/rescaled.bootstrap.R:273:24: style: There should be a space between right parenthesis and an opening curly brace.

if(firstStage){
                       ^~

R/rescaled.bootstrap.R:274:1: style: Lines should not be more than 80 characters.

​            dt.eval("next.PSU[is.na(",new.var,"),c(new.var):=head(",higher.stages,",1)]")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/rescaled.bootstrap.R:274:39: style: Commas should always have a space after.

​            dt.eval("next.PSU[is.na(",new.var,"),c(new.var):=head(",higher.stages,",1)]")
                                      ^

R/rescaled.bootstrap.R:274:47: style: Commas should always have a space after.

​            dt.eval("next.PSU[is.na(",new.var,"),c(new.var):=head(",higher.stages,",1)]")
                                              ^

R/rescaled.bootstrap.R:274:69: style: Commas should always have a space after.

​            dt.eval("next.PSU[is.na(",new.var,"),c(new.var):=head(",higher.stages,",1)]")
                                                                    ^

R/rescaled.bootstrap.R:274:83: style: Commas should always have a space after.

​            dt.eval("next.PSU[is.na(",new.var,"),c(new.var):=head(",higher.stages,",1)]")
                                                                                  ^

R/rescaled.bootstrap.R:276:1: style: Lines should not be more than 80 characters.

​            dt.eval("next.PSU[is.na(",new.var,"),c(new.var):=head(",by.val.tail,",1),by=c(higher.stages)]")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/rescaled.bootstrap.R:276:39: style: Commas should always have a space after.

​            dt.eval("next.PSU[is.na(",new.var,"),c(new.var):=head(",by.val.tail,",1),by=c(higher.stages)]")
                                      ^

R/rescaled.bootstrap.R:276:47: style: Commas should always have a space after.

​            dt.eval("next.PSU[is.na(",new.var,"),c(new.var):=head(",by.val.tail,",1),by=c(higher.stages)]")
                                              ^

R/rescaled.bootstrap.R:276:69: style: Commas should always have a space after.

​            dt.eval("next.PSU[is.na(",new.var,"),c(new.var):=head(",by.val.tail,",1),by=c(higher.stages)]")
                                                                    ^

R/rescaled.bootstrap.R:276:81: style: Commas should always have a space after.

​            dt.eval("next.PSU[is.na(",new.var,"),c(new.var):=head(",by.val.tail,",1),by=c(higher.stages)]")
                                                                                ^

R/rescaled.bootstrap.R:279:1: style: Trailing whitespace is superfluous.

^~~~~~~~

R/rescaled.bootstrap.R:281:50: style: Commas should always have a space after.

next.PSU <- dt.eval("next.PSU[N == 1 | ",new.var," == ",by.val.tail,"]")
                                                 ^

R/rescaled.bootstrap.R:281:58: style: Commas should always have a space after.

next.PSU <- dt.eval("next.PSU[N == 1 | ",new.var," == ",by.val.tail,"]")
                                                         ^

R/rescaled.bootstrap.R:281:65: style: Commas should always have a space after.

next.PSU <- dt.eval("next.PSU[N == 1 | ",new.var," == ",by.val.tail,"]")
                                                                ^

R/rescaled.bootstrap.R:281:77: style: Commas should always have a space after.

next.PSU <- dt.eval("next.PSU[N == 1 | ",new.var," == ",by.val.tail,"]")
                                                                            ^

R/rescaled.bootstrap.R:284:1: style: Trailing whitespace is superfluous.

^~~~~~~~

R/rescaled.bootstrap.R:288:31: style: Commas should always have a space after.

​        dt.eval("dat[!is.na(",new.var,"),c(fpc.i_ADD) := 
                              ^

R/rescaled.bootstrap.R:288:39: style: Commas should always have a space after.

​        dt.eval("dat[!is.na(",new.var,"),c(fpc.i_ADD) := 
                                      ^

R/rescaled.bootstrap.R:288:57: style: Trailing whitespace is superfluous.

​        dt.eval("dat[!is.na(",new.var,"),c(fpc.i_ADD) := 
                                                        ^

R/rescaled.bootstrap.R:289:23: style: Commas should always have a space after.

​                sum(",fpc.i_ADD,"[!duplicated(",by.val.tail,")]),
                      ^

R/rescaled.bootstrap.R:289:33: style: Commas should always have a space after.

​                sum(",fpc.i_ADD,"[!duplicated(",by.val.tail,")]),
                                ^

R/rescaled.bootstrap.R:289:49: style: Commas should always have a space after.

​                sum(",fpc.i_ADD,"[!duplicated(",by.val.tail,")]),
                                                ^

R/rescaled.bootstrap.R:289:61: style: Commas should always have a space after.

​                sum(",fpc.i_ADD,"[!duplicated(",by.val.tail,")]),
                                                            ^

R/rescaled.bootstrap.R:293:1: style: Trailing whitespace is superfluous.

^~~~~~~~

R/rescaled.bootstrap.R:296:71: style: Commas should always have a space after.

​        dt.eval("dat[!is.na(", new.var, "),", fpc[i], ":=", fpc.i_ADD,"]")
                                                                      ^

R/rescaled.bootstrap.R:297:1: style: Trailing whitespace is superfluous.

^~~~~~~~

R/rescaled.bootstrap.R:317:1: style: Lines should not be more than 80 characters.

")),by=c(by.val)][V1==1,.(",paste(by.val,collapse=","),")]"))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/rescaled.bootstrap.R:317:51: style: Commas should always have a space after.

")),by=c(by.val)][V1==1,.(",paste(by.val,collapse=","),")]"))
                                                  ^

R/rescaled.bootstrap.R:317:64: style: Commas should always have a space after.

")),by=c(by.val)][V1==1,.(",paste(by.val,collapse=","),")]"))
                                                               ^

R/rescaled.bootstrap.R:317:72: style: Put spaces around all infix operators.

")),by=c(by.val)][V1==1,.(",paste(by.val,collapse=","),")]"))
                                                                      ~^~

R/rescaled.bootstrap.R:317:78: style: Commas should always have a space after.

")),by=c(by.val)][V1==1,.(",paste(by.val,collapse=","),")]"))
                                                                             ^

tests/testthat/test_ipf.R:145:1: style: Lines should not be more than 80 characters.

eusilc, hid = "hid", conP = list(conP1, conP2), conH = list(conH1,conH1,conH1),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_ipf.R:145:71: style: Commas should always have a space after.

eusilc, hid = "hid", conP = list(conP1, conP2), conH = list(conH1,conH1,conH1),
                                                                      ^

tests/testthat/test_ipf.R:145:77: style: Commas should always have a space after.

eusilc, hid = "hid", conP = list(conP1, conP2), conH = list(conH1,conH1,conH1),
                                                                            ^

tests/testthat/test_ipf.R:146:40: style: Commas should always have a space after.

epsP = c(1e-06), epsH = list(epsH1,1e-06), w = "baseWeight", bound = 4,
                                       ^

tests/testthat/test_ipf.R:148:1: style: Lines should not be more than 80 characters.

regexp = "Provided household eps argument does not fit household constraints.")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_ipf.R:152:41: style: Commas should always have a space after.

epsP = c(1e-06), epsH = list(epsH1[,1:8]), w = "baseWeight", bound = 4,
                                        ^

tests/testthat/test_ipf.R:154:1: style: Lines should not be more than 80 characters.

regexp = "Provided household eps argument 1 does not fit in dimension to  household constraints 1 .")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_ipf.R:157:1: style: Lines should not be more than 80 characters.

eusilc, hid = "hid", conP = list(conP1, conP2), conH = list(conH1,conH1,conH1),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_ipf.R:157:71: style: Commas should always have a space after.

eusilc, hid = "hid", conP = list(conP1, conP2), conH = list(conH1,conH1,conH1),
                                                                      ^

tests/testthat/test_ipf.R:157:77: style: Commas should always have a space after.

eusilc, hid = "hid", conP = list(conP1, conP2), conH = list(conH1,conH1,conH1),
                                                                            ^

tests/testthat/test_ipf.R:158:1: style: Lines should not be more than 80 characters.

epsP = c(1e-06,22), epsH = list(epsH1,1e-06,1e-6), w = "baseWeight", bound = 4,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_ipf.R:158:20: style: Commas should always have a space after.

epsP = c(1e-06,22), epsH = list(epsH1,1e-06,1e-6), w = "baseWeight", bound = 4,
                   ^

tests/testthat/test_ipf.R:158:43: style: Commas should always have a space after.

epsP = c(1e-06,22), epsH = list(epsH1,1e-06,1e-6), w = "baseWeight", bound = 4,
                                          ^

tests/testthat/test_ipf.R:158:49: style: Commas should always have a space after.

epsP = c(1e-06,22), epsH = list(epsH1,1e-06,1e-6), w = "baseWeight", bound = 4,
                                                ^

tests/testthat/test_ipf.R:160:1: style: Lines should not be more than 80 characters.

regexp = "Individual eps arguments for each constraints must be defined as list.")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_ipf.R:170:56: style: Commas should always have a space after.

verbose = FALSE, maxIter = 200, minMaxTrim = c(450,700))
                                                       ^

tests/testthat/test_ipf.R:178:1: style: Lines should not be more than 80 characters.

​  expect_true(all(calibweights2$calibWeight<=700)&&all(calibweights2$calibWeight>=450))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_ipf.R:178:44: style: Put spaces around all infix operators.

​  expect_true(all(calibweights2$calibWeight<=700)&&all(calibweights2$calibWeight>=450))
                                          ~^~~

tests/testthat/test_ipf.R:178:50: style: Put spaces around all infix operators.

​  expect_true(all(calibweights2$calibWeight<=700)&&all(calibweights2$calibWeight>=450))
                                                ~^~~

tests/testthat/test_ipf.R:178:81: style: Put spaces around all infix operators.

​  expect_true(all(calibweights2$calibWeight<=700)&&all(calibweights2$calibWeight>=450))
                                                                               ~^~~

tests/testthat/test_ipf.R:186:56: style: Commas should always have a space after.

verbose = FALSE, maxIter = 200, minMaxTrim = c(340,870))
                                                       ^

tests/testthat/test_ipf.R:196:1: style: Lines should not be more than 80 characters.

​  expect_true(all(calibweights2$calibWeight<=870)&&all(calibweights2$calibWeight>=340))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_ipf.R:196:44: style: Put spaces around all infix operators.

​  expect_true(all(calibweights2$calibWeight<=870)&&all(calibweights2$calibWeight>=340))
                                          ~^~~

tests/testthat/test_ipf.R:196:50: style: Put spaces around all infix operators.

​  expect_true(all(calibweights2$calibWeight<=870)&&all(calibweights2$calibWeight>=340))
                                                ~^~~

tests/testthat/test_ipf.R:196:81: style: Put spaces around all infix operators.

​  expect_true(all(calibweights2$calibWeight<=870)&&all(calibweights2$calibWeight>=340))
                                                                               ~^~~

vignettes/error_estimation.Rmd:42:1: style: Lines should not be more than 80 characters.

dat_boot_calib[1:5, .(year, povertyRisk, eqIncome, onePerson, pWeight, w1, w2, w3, w4, w5)]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vignettes/error_estimation.Rmd:54:1: style: Lines should not be more than 80 characters.

povertyRate <- calc.stError(dat_boot_calib, var = "povertyRisk", fun = weightedRatio)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vignettes/error_estimation.Rmd:83:8: style: Put spaces around all infix operators.

​  sum(x*w)
      ~^~

vignettes/error_estimation.Rmd:87:1: style: Lines should not be more than 80 characters.

totalIncome2 <- calc.stError(dat_boot_calib, var = "eqIncome", fun = myWeightedSum)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vignettes/error_estimation.Rmd:101:1: style: Lines should not be more than 80 characters.

multipleRates <- calc.stError(dat_boot_calib, var = c("povertyRisk", "onePerson"), fun = weightedRatio)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vignettes/error_estimation.Rmd:124:1: style: Lines should not be more than 80 characters.

povertyRates <- calc.stError(dat2, var = "povertyRisk", fun = weightedRatio, group = "region")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vignettes/error_estimation.Rmd:148:77: style: Trailing whitespace is superfluous.

povertyRates <- calc.stError(dat2, var = "povertyRisk", fun = weightedRatio, 
                                                                            ^

vignettes/error_estimation.Rmd:162:77: style: Trailing whitespace is superfluous.

povertyRates <- calc.stError(dat2, var = "povertyRisk", fun = weightedRatio, 
                                                                            ^

vignettes/error_estimation.Rmd:180:77: style: Trailing whitespace is superfluous.

povertyRates <- calc.stError(dat2, var = "povertyRisk", fun = weightedRatio, 
                                                                            ^

vignettes/error_estimation.Rmd:181:1: style: Lines should not be more than 80 characters.

group = list("gender", "region", c("gender", "region")))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vignettes/ipf.Rmd:34:47: style: Put spaces around all infix operators.

pop_sample <- population[sample(1:.N, floor(.N*0.10)), ]
                                             ~^~

vignettes/ipf.Rmd:116:1: style: Lines should not be more than 80 characters.

pop_sample_c2 <- ipf(pop_sample, conP = list(con_ga, registry_table), w = "pWeight")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vignettes/runtimeTests.R:8:1: style: Lines should not be more than 80 characters.

dat_boot <- draw.bootstrap(eusilc,REP=1000,hid="db030",weights="rb050",strata=c("db040"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vignettes/runtimeTests.R:8:36: style: Commas should always have a space after.

dat_boot <- draw.bootstrap(eusilc,REP=1000,hid="db030",weights="rb050",strata=c("db040"),
                                   ^

vignettes/runtimeTests.R:8:39: style: Put spaces around all infix operators.

dat_boot <- draw.bootstrap(eusilc,REP=1000,hid="db030",weights="rb050",strata=c("db040"),
                                     ~^~

vignettes/runtimeTests.R:8:45: style: Commas should always have a space after.

dat_boot <- draw.bootstrap(eusilc,REP=1000,hid="db030",weights="rb050",strata=c("db040"),
                                            ^

vignettes/runtimeTests.R:8:48: style: Put spaces around all infix operators.

dat_boot <- draw.bootstrap(eusilc,REP=1000,hid="db030",weights="rb050",strata=c("db040"),
                                              ~^~

vignettes/runtimeTests.R:8:57: style: Commas should always have a space after.

dat_boot <- draw.bootstrap(eusilc,REP=1000,hid="db030",weights="rb050",strata=c("db040"),
                                                        ^

vignettes/runtimeTests.R:8:64: style: Put spaces around all infix operators.

dat_boot <- draw.bootstrap(eusilc,REP=1000,hid="db030",weights="rb050",strata=c("db040"),
                                                              ~^~

vignettes/runtimeTests.R:8:73: style: Commas should always have a space after.

dat_boot <- draw.bootstrap(eusilc,REP=1000,hid="db030",weights="rb050",strata=c("db040"),
                                                                        ^

Please sign in to comment.