Running examples in ‘dataPreparation-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: build_encoding
> ### Title: Compute encoding
> ### Aliases: build_encoding
> 
> ### ** Examples
> 
> # Get a data set
> data(adult)
> encoding <- build_encoding(adult, cols = "auto", verbose = TRUE)
[1] "age"           "fnlwgt"        "education_num" "capital_gain" 
[5] "capital_loss"  "hr_per_week"  
[1] "build_encoding: c(\"age\", \"fnlwgt\", \"education_num\", \"capital_gain\", \"capital_loss\", \"hr_per_week\") aren't columns of types factor or character i do nothing for those variables."
[1] "build_encoding: I will compute encoding on 9 character and factor columns."
[1] "build_encoding: it took me: 0s to compute encoding for 9 character and factor columns."
> 
> print(encoding)
$type_employer
$type_employer$new_cols
                 type_employer.?        type_employer.Federal-gov 
               "type.employer.."      "type.employer.Federal.gov" 
         type_employer.Local-gov       type_employer.Never-worked 
       "type.employer.Local.gov"     "type.employer.Never.worked" 
           type_employer.Private       type_employer.Self-emp-inc 
         "type.employer.Private"     "type.employer.Self.emp.inc" 
  type_employer.Self-emp-not-inc          type_employer.State-gov 
"type.employer.Self.emp.not.inc"        "type.employer.State.gov" 
       type_employer.Without-pay 
     "type.employer.Without.pay" 

$type_employer$values
[1] "?"                "Federal-gov"      "Local-gov"        "Never-worked"    
[5] "Private"          "Self-emp-inc"     "Self-emp-not-inc" "State-gov"       
[9] "Without-pay"     


$education
$education$new_cols
          education.10th           education.11th           education.12th 
        "education.10th"         "education.11th"         "education.12th" 
       education.1st-4th        education.5th-6th        education.7th-8th 
     "education.1st.4th"      "education.5th.6th"      "education.7th.8th" 
           education.9th     education.Assoc-acdm      education.Assoc-voc 
         "education.9th"   "education.Assoc.acdm"    "education.Assoc.voc" 
     education.Bachelors      education.Doctorate        education.HS-grad 
   "education.Bachelors"    "education.Doctorate"      "education.HS.grad" 
       education.Masters      education.Preschool    education.Prof-school 
     "education.Masters"    "education.Preschool"  "education.Prof.school" 
  education.Some-college 
"education.Some.college" 

$education$values
 [1] "10th"         "11th"         "12th"         "1st-4th"      "5th-6th"     
 [6] "7th-8th"      "9th"          "Assoc-acdm"   "Assoc-voc"    "Bachelors"   
[11] "Doctorate"    "HS-grad"      "Masters"      "Preschool"    "Prof-school" 
[16] "Some-college"


$marital
$marital$new_cols
               marital.Divorced       marital.Married-AF-spouse 
             "marital.Divorced"     "marital.Married.AF.spouse" 
     marital.Married-civ-spouse   marital.Married-spouse-absent 
   "marital.Married.civ.spouse" "marital.Married.spouse.absent" 
          marital.Never-married               marital.Separated 
        "marital.Never.married"             "marital.Separated" 
                marital.Widowed 
              "marital.Widowed" 

$marital$values
[1] "Divorced"              "Married-AF-spouse"     "Married-civ-spouse"   
[4] "Married-spouse-absent" "Never-married"         "Separated"            
[7] "Widowed"              


$occupation
$occupation$new_cols
                  occupation.?        occupation.Adm-clerical 
                "occupation.."      "occupation.Adm.clerical" 
       occupation.Armed-Forces        occupation.Craft-repair 
     "occupation.Armed.Forces"      "occupation.Craft.repair" 
    occupation.Exec-managerial     occupation.Farming-fishing 
  "occupation.Exec.managerial"   "occupation.Farming.fishing" 
  occupation.Handlers-cleaners   occupation.Machine-op-inspct 
"occupation.Handlers.cleaners" "occupation.Machine.op.inspct" 
      occupation.Other-service     occupation.Priv-house-serv 
    "occupation.Other.service"   "occupation.Priv.house.serv" 
     occupation.Prof-specialty     occupation.Protective-serv 
   "occupation.Prof.specialty"   "occupation.Protective.serv" 
              occupation.Sales        occupation.Tech-support 
            "occupation.Sales"      "occupation.Tech.support" 
   occupation.Transport-moving 
 "occupation.Transport.moving" 

$occupation$values
 [1] "?"                 "Adm-clerical"      "Armed-Forces"     
 [4] "Craft-repair"      "Exec-managerial"   "Farming-fishing"  
 [7] "Handlers-cleaners" "Machine-op-inspct" "Other-service"    
[10] "Priv-house-serv"   "Prof-specialty"    "Protective-serv"  
[13] "Sales"             "Tech-support"      "Transport-moving" 


$relationship
$relationship$new_cols
         relationship.Husband    relationship.Not-in-family 
       "relationship.Husband"  "relationship.Not.in.family" 
  relationship.Other-relative        relationship.Own-child 
"relationship.Other.relative"      "relationship.Own.child" 
       relationship.Unmarried             relationship.Wife 
     "relationship.Unmarried"           "relationship.Wife" 

$relationship$values
[1] "Husband"        "Not-in-family"  "Other-relative" "Own-child"     
[5] "Unmarried"      "Wife"          


$race
$race$new_cols
  race.Amer-Indian-Eskimo   race.Asian-Pac-Islander                race.Black 
"race.Amer.Indian.Eskimo" "race.Asian.Pac.Islander"              "race.Black" 
               race.Other                race.White 
             "race.Other"              "race.White" 

$race$values
[1] "Amer-Indian-Eskimo" "Asian-Pac-Islander" "Black"             
[4] "Other"              "White"             


$sex
$sex$new_cols
  sex.Female     sex.Male 
"sex.Female"   "sex.Male" 

$sex$values
[1] "Female" "Male"  


$country
$country$new_cols
                           country.?                     country.Cambodia 
                         "country.."                   "country.Cambodia" 
                      country.Canada                        country.China 
                    "country.Canada"                      "country.China" 
                    country.Columbia                         country.Cuba 
                  "country.Columbia"                       "country.Cuba" 
          country.Dominican-Republic                      country.Ecuador 
        "country.Dominican.Republic"                    "country.Ecuador" 
                 country.El-Salvador                      country.England 
               "country.El.Salvador"                    "country.England" 
                      country.France                      country.Germany 
                    "country.France"                    "country.Germany" 
                      country.Greece                    country.Guatemala 
                    "country.Greece"                  "country.Guatemala" 
                       country.Haiti           country.Holand-Netherlands 
                     "country.Haiti"         "country.Holand.Netherlands" 
                    country.Honduras                         country.Hong 
                  "country.Honduras"                       "country.Hong" 
                     country.Hungary                        country.India 
                   "country.Hungary"                      "country.India" 
                        country.Iran                      country.Ireland 
                      "country.Iran"                    "country.Ireland" 
                       country.Italy                      country.Jamaica 
                     "country.Italy"                    "country.Jamaica" 
                       country.Japan                         country.Laos 
                     "country.Japan"                       "country.Laos" 
                      country.Mexico                    country.Nicaragua 
                    "country.Mexico"                  "country.Nicaragua" 
  country.Outlying-US(Guam-USVI-etc)                         country.Peru 
"country.Outlying.US.Guam.USVI.etc."                       "country.Peru" 
                 country.Philippines                       country.Poland 
               "country.Philippines"                     "country.Poland" 
                    country.Portugal                  country.Puerto-Rico 
                  "country.Portugal"                "country.Puerto.Rico" 
                    country.Scotland                        country.South 
                  "country.Scotland"                      "country.South" 
                      country.Taiwan                     country.Thailand 
                    "country.Taiwan"                   "country.Thailand" 
             country.Trinadad&Tobago                country.United-States 
           "country.Trinadad.Tobago"              "country.United.States" 
                     country.Vietnam                   country.Yugoslavia 
                   "country.Vietnam"                 "country.Yugoslavia" 

$country$values
 [1] "?"                          "Cambodia"                  
 [3] "Canada"                     "China"                     
 [5] "Columbia"                   "Cuba"                      
 [7] "Dominican-Republic"         "Ecuador"                   
 [9] "El-Salvador"                "England"                   
[11] "France"                     "Germany"                   
[13] "Greece"                     "Guatemala"                 
[15] "Haiti"                      "Holand-Netherlands"        
[17] "Honduras"                   "Hong"                      
[19] "Hungary"                    "India"                     
[21] "Iran"                       "Ireland"                   
[23] "Italy"                      "Jamaica"                   
[25] "Japan"                      "Laos"                      
[27] "Mexico"                     "Nicaragua"                 
[29] "Outlying-US(Guam-USVI-etc)" "Peru"                      
[31] "Philippines"                "Poland"                    
[33] "Portugal"                   "Puerto-Rico"               
[35] "Scotland"                   "South"                     
[37] "Taiwan"                     "Thailand"                  
[39] "Trinadad&Tobago"            "United-States"             
[41] "Vietnam"                    "Yugoslavia"                


$income
$income$new_cols
  income.<=50K    income.>50K 
"income...50K"  "income..50K" 

$income$values
[1] "<=50K" ">50K" 


> 
> # To limit the number of generated columns, one can use min_frequency parameter:
> build_encoding(adult, cols = "auto", verbose = TRUE, min_frequency = 0.1)
[1] "age"           "fnlwgt"        "education_num" "capital_gain" 
[5] "capital_loss"  "hr_per_week"  
[1] "build_encoding: c(\"age\", \"fnlwgt\", \"education_num\", \"capital_gain\", \"capital_loss\", \"hr_per_week\") aren't columns of types factor or character i do nothing for those variables."
[1] "build_encoding: I will compute encoding on 9 character and factor columns."
Error in `[.data.table`(data_set, , `:=`(c("freq"), (.N/nrow(data_set))),  : 
  attempt access index 15/15 in VECTOR_ELT
Calls: build_encoding -> [ -> [.data.table
Execution halted