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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: hansen
> ### Title: Hansen accessibility
> ### Aliases: hansen
> 
> ### ** Examples
> 
> # Example from Levy/Weitz (2009):
> # Data for the existing and the new location
> locations <- c("Existing Store", "New Store")
> S_j <- c(5000, 10000)
> location_data <- data.frame(locations, S_j)
> # Data for the two communities (Rock Creek and Oak Hammock)
> communities <- c("Rock Creek", "Oak Hammock")
> C_i <- c(5000000, 3000000)
> community_data <- data.frame(communities, C_i)
> # Combining location and submarket data in the interaction matrix
> interactionmatrix <- merge (community_data, location_data)
> # Adding driving time:
> interactionmatrix[1,5] <- 10
> interactionmatrix[2,5] <- 5
> interactionmatrix[3,5] <- 5
> interactionmatrix[4,5] <- 15
> colnames(interactionmatrix) <- c("communities", "C_i", "locations", "S_j", "d_ij")
> shoppingcenters1 <- interactionmatrix
> huff_shares <- huff(shoppingcenters1, "communities", "locations", "S_j", "d_ij")
Huff Model 

Summary: 
2 locations with mean attractivity = 7500 
2 origins with mean transport costs = 8.75 
Attractivity weighting (pow) with Gamma = 1 
Distance weighting (pow) with Lambda = -2 

Interaction matrix 
  communities   C_i      locations   S_j d_ij      U_ij sum_U_ij      p_ij
2 Oak Hammock 3e+06 Existing Store  5000    5 200.00000 244.4444 0.8181818
4 Oak Hammock 3e+06      New Store 10000   15  44.44444 244.4444 0.1818182
1  Rock Creek 5e+06 Existing Store  5000   10  50.00000 450.0000 0.1111111
3  Rock Creek 5e+06      New Store 10000    5 400.00000 450.0000 0.8888889
> # Market shares of the new location:
> huff_shares$ijmatrix[huff_shares$ijmatrix$locations == "New Store",]
  communities   C_i locations   S_j d_ij      U_ij sum_U_ij      p_ij
4 Oak Hammock 3e+06 New Store 10000   15  44.44444 244.4444 0.1818182
3  Rock Creek 5e+06 New Store 10000    5 400.00000 450.0000 0.8888889
> # Hansen accessibility for Oak Hammock and Rock Creek:
> hansen (huff_shares$ijmatrix, "communities", "locations", "S_j", "d_ij")
Error in exists(as.character(substitute(od_dataset))) : 
  first argument has length > 1
Calls: hansen -> exists
Execution halted