mPlaces &lt;- v != vStartCase
  
  #The problemValues are then the values in v in the problemPlaces. In 
  #no problems are found, we store NULL
  if (any(problemPlaces)) {
    problemValues &lt;- v[problemPlaces]
  } else problemValues &lt;- NULL
  
  #We store the a logical indicator of whether a problem was found
  problem &lt;- any(problemPlaces)
  
  
  problemStatus &lt;- list(problem = problem,
                        problemValues = problemValues)

  problemMessage &lt;- &quot;The following values w