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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: radiation
> ### Title: Estimation of Direct and Diffuse Radiation Load on Extruded
> ###   Polygon Surfaces
> ### Aliases: radiation
> 
> ### ** Examples
> 
> 
> # Create surface grid
> grid = surfaceGrid(
+   obstacles = build[1, ],
+   obstacles_height_field = "BLDG_HT",
+   res = 2
+ )
> 
> solar_pos = tmy[, c("sun_az", "sun_elev")]
> solar_pos = as.matrix(solar_pos)
> 
> # Summed 10-hour radiation estimates for two 3D points
> rad1 = radiation(
+   grid = grid[1:2, ],
+   obstacles = build,
+   obstacles_height_field = "BLDG_HT",
+   solar_pos = solar_pos[8:17, , drop = FALSE],
+   solar_normal = tmy$solar_normal[8:17],
+   solar_diffuse = tmy$solar_diffuse[8:17],
+   returnList = TRUE
+ )
Determining Shadow

  |                                                                            
  |                                                                      |   0%Warning in if (class(solar_pos) != "matrix") stop("'solar_pos' must be a 'matrix' object") :
  the condition has length > 1 and only the first element will be used

  |                                                                            
  |=======                                                               |  10%Warning in if (class(solar_pos) != "matrix") stop("'solar_pos' must be a 'matrix' object") :
  the condition has length > 1 and only the first element will be used

  |                                                                            
  |==============                                                        |  20%Warning in if (class(solar_pos) != "matrix") stop("'solar_pos' must be a 'matrix' object") :
  the condition has length > 1 and only the first element will be used

  |                                                                            
  |=====================                                                 |  30%Warning in if (class(solar_pos) != "matrix") stop("'solar_pos' must be a 'matrix' object") :
  the condition has length > 1 and only the first element will be used

  |                                                                            
  |============================                                          |  40%Warning in if (class(solar_pos) != "matrix") stop("'solar_pos' must be a 'matrix' object") :
  the condition has length > 1 and only the first element will be used

  |                                                                            
  |===================================                                   |  50%Warning in if (class(solar_pos) != "matrix") stop("'solar_pos' must be a 'matrix' object") :
  the condition has length > 1 and only the first element will be used

  |                                                                            
  |==========================================                            |  60%Warning in if (class(solar_pos) != "matrix") stop("'solar_pos' must be a 'matrix' object") :
  the condition has length > 1 and only the first element will be used

  |                                                                            
  |=================================================                     |  70%Warning in if (class(solar_pos) != "matrix") stop("'solar_pos' must be a 'matrix' object") :
  the condition has length > 1 and only the first element will be used

  |                                                                            
  |========================================================              |  80%Warning in if (class(solar_pos) != "matrix") stop("'solar_pos' must be a 'matrix' object") :
  the condition has length > 1 and only the first element will be used

  |                                                                            
  |===============================================================       |  90%Warning in if (class(solar_pos) != "matrix") stop("'solar_pos' must be a 'matrix' object") :
  the condition has length > 1 and only the first element will be used

  |                                                                            
  |======================================================================| 100%
Done
Error in sweep(x = coef, MARGIN = 2, STATS = solar_normal, FUN = "*") : 
  argument "X" is missing, with no default
Calls: radiation -> .radiationGrid -> sweep
Execution halted