title: Truncate decimal to specified places
body: <p>This seems like it should be a fairly easy problem to solve but I am having some trouble locating an answer.</p>
  
  <p>I have a vector which contains long decimals and I want to truncate it to a specific number of decimals. I do not wish to round it, but rather just remove the values beyond my desired number of decimals.</p>
  
  <p>For example I would like 0.123456789 to return 0.1234 if I desired 4 decimal digits. This is not an issue of printing a specific number of digits but rather returning the original value truncated to a given number.</p>
  
  <p>Thanks.</p>