title: How to get column name and column index
body: <p>Hi I have the below dataframe. Since the column contains NA's the datatype of the column is <code>character</code>. Now, I need to get the column name and index which only contains String value. </p>
  
  <p>In the example below, I want to get the column name and column index of Zo-A and Zo-B:</p>
  
  <pre><code> ZONE-1        Zo-A         Zone-3        Zo-B
   58            On             75          NA
   60            NA             NA          High
   NA            Off            68          Low
   70            On             NA          NA
  </code></pre>
  
  <p>So far I tried to first convert all of them to numeric, which created NA's for Zo-A and Zo-B column. And if I use the below code for column index, I'm getting NA's as a result</p>
  
  <pre><code>a &lt;- which(colnames(df)=="Zo-A" )
  integer(0)
  
  match_col &lt;- match(c("Zo-A","Zo-B")names(df))
  NA NA
  </code></pre>
  
  <p>I need to perform below operations:</p>
  
  <ol>
  <li>I need to first get the <code>column names</code> which consists of <code>String</code> values</li>
  <li>I need the <code>column index</code> for the same</li>
  </ol>