original_docstring: r"""Get the lines necessary to finalize an array after iteration.
  
          Args:
              var (dict, str): Name or information dictionary for the variable
                  being initialized.
  
          Returns:
              list: The lines finalizing the variable.
  
          
docstring: r"""Get the lines necessary to finalize an array after iteration.
docstring_tokens: r " " " Get the lines necessary to finalize an array after iteration .
code: def write_finalize_oiter(cls, var):
          r"""Get the lines necessary to finalize an array after iteration.
  
          Args:
              var (dict, str): Name or information dictionary for the variable
                  being initialized.
  
          Returns:
              list: The lines finalizing the variable.
  
          """
          out = super(RModelDriver, cls).write_finalize_oiter(var)
          out += [
              'if (is({name}[[1]], "units")) {{'.format(name=var['name']),
              '  {name}_units = units::deparse_unit({name}[[1]])'.format(
                  name=var['name']),
              '} else {',
              '  {name}_units = NULL'.format(name=var['name']),
              '}',
              '{name} = array(as.numeric(unlist({name})))'.format(name=var['name']),
              'if (!(is.null({name}_units))) {{'.format(name=var['name']),
              ('  {name} = units::set_units({name}, {name}_units, '
               ' mode="standard")').format(name=var['name']),
              '}',
          ]
          return out
code_tokens: def write_finalize_oiter ( cls , var ) : out = super ( RModelDriver , cls ) . write_finalize_oiter ( var ) out += [ 'if (is({name}[[1]], "units")) {{' . format ( name = var [ 'name' ] ) , '  {name}_units = units::deparse_unit({name}[[1]])' . format ( name = var [ 'name' ] ) , '} else {' , '  {name}_units = NULL' . format ( name = var [ 'name' ] ) , '}' , '{name} = array(as.numeric(unlist({name})))' . format ( name = var [ 'name' ] ) , 'if (!(is.null({name}_units))) {{' . format ( name = var [ 'name' ] ) , ( '  {name} = units::set_units({name}, {name}_units, ' ' mode="standard")' ) . format ( name = var [ 'name' ] ) , '}' , ] return out
short_docstring: r"""Get the lines necessary to finalize an array after iteration.
short_docstring_tokens: r " " " Get the lines necessary to finalize an array after iteration .
comment: r"""Get the lines necessary to finalize an array after iteration.
  
          Args:
              var (dict, str): Name or information dictionary for the variable
                  being initialized.
  
          Returns:
              list: The lines finalizing the variable.
  
          """