title: Height conversion in R
body: <p>I have recently started learning R and I am facing an issue.
  I have a column in my data which have height of players in (feet'inches) format.
  I want to create a new column for height in centimeters. For this I used the "strsplit" function as below(df is the height column):</p>
  
  <pre><code>l &lt;- strsplit(df,"'",fixed = T)
  print(l)
  </code></pre>
  
  <pre><code>[[1]]
  
  [1] "5" "7"
  
  [[2]]
  
  [1] "6" "2"
  
  [[3]]
  
  [1] "5" "9"
  
  [[4]]
  
  [1] "6" "4"
  
  [[5]]
  
  [1] "5"  "11"
  
  [[6]]
  
  [1] "5" "8"
  
  </code></pre>
  
  <p>I am getting stuck here as I don't know how to obtain the required value after splitting the field.</p>
  
  <p>I am trying to use the below code but its giving the following error:</p>
  
  <pre><code>p_pos &lt;- grep("'",df)
  l[[p_pos]][1]
  </code></pre>
  
  <p><code>Error in l[[p_pos]] : recursive indexing failed at level 2</code></p>
  
  <p>I am expecting the above code to print the values from the first column in the list</p>
  
  <p><code>5 6 5 6 5 5</code></p>
  
  <pre><code>&gt;dput(head(df, 10))
  c("5'7", "6'2", "5'9", "6'4", "5'11", "5'8")
  </code></pre>