Running examples in 'MCI2-Ex.R' failed
The error most likely occurred in:

> ### Name: HaslachDistricts
> ### Title: Freiburg-Haslach: districts
> ### Aliases: HaslachDistricts
> ### Keywords: datasets
> 
> ### ** Examples
> 
> # Compilation of tcmat list from existing datasets:
> # (Results from the tcmat.create function)
> data(Haslach_tcmatAirline)
> # airline distances
> data(Haslach_coords_origins)
> # Coordinates of origins
> data(Haslach_coords_destinations)
> # Coordinates of destinationes
> 
> # Component "tc.mode":
> Airline_tc.mode <- list()
> Airline_tc.mode$tc.type = "airline"
> Airline_tc.mode$tc.unit = "km"
> Airline_tc.mode$tc.constant = 0
> 
> # tcmat with airline distances
> # Compilation as a list:
> tcmat_haslach_airline <- list(tcmat = Haslach_tcmatAirline,
+ coords_origins = Haslach_coords_origins,
+ coords_destinations = Haslach_coords_destinations,
+ tc.mode = Airline_tc.mode)
> 
> Drvtime_tc.mode <- list()
> Drvtime_tc.mode$tc.type = "street"
> Drvtime_tc.mode$tc.unit = "min"
> Drvtime_tc.mode$tc.constant = 0
> 
> data(Haslach_tcmatDrvtime)
> # car driving times
> 
> # tcmat with car driving times
> # Compilation as a list:
> tcmat_haslach_drvtime <- list(tcmat = Haslach_tcmatDrvtime,
+ coords_origins = Haslach_coords_origins,
+ coords_destinations = Haslach_coords_destinations,
+ tc.mode = Airline_tc.mode)
> 
> data(HaslachSurvey)
> # survey raw data (Store choices and purchases)
> data(HaslachDistricts)
> # IDs and information about customer origins
> data(HaslachStores)
> # IDs and information about destinations (grocery stores)
> 
> # Preparing raw data (HaslachSurvey)
> HaslachSurvey_prepared <- rawdata.prep (cols.below1 = 
+ list(HaslachSurvey$LM1_Text, HaslachSurvey$LM2_Text),
+ cols.below2 = list(HaslachSurvey$LM1E, HaslachSurvey$LM2E),
+ cols.keep = HaslachSurvey$WO,
+ colnames.new = c("LM", "LME", "Wohnort"))
> # "WO" and "Wohnort" = origin ID
> # "LM1_Text", "LM2_Text" and "LM" = destination IDs (grocery stores)
> # "LM1E", "LM2E" and "LME" = grocery store purchases
> 
> # Creating a MCI interaction matrix
> # based on raw data of a survey (HaslachSurvey_prepared)
> # and a tcmat list object
> mcimat_haslach <- mcimat.create(rawdata = HaslachSurvey_prepared, 
+ origins.id = "Wohnort", destinations.id = "LM", "LME", 
+ tcmat = tcmat_haslach_airline, 
+ remOrig = c("SBXXX", "SB613"), corObserved = 0.1,
+ origvar.data = HaslachDistricts, origvardata.id = "WO",
+ destvar.data = HaslachStores, destvardata.id = "LM")
Error in `[[<-.data.frame`(`*tmp*`, addvar_abs_name, value = 0) : 
  replacement has 1 row, data has 0
Calls: mcimat.create -> [[<- -> [[<-.data.frame
Execution halted