title: Does the transform function in plyr change variable names?
body: <p>The data set I am working with has two and three-word variable names with space in between. </p>
  
  <pre><code>&gt; names(final.data1)
  ##  [1] "Vehicle ID"           "Frame ID"             "Total Frames"        
  ##  [4] "Global Time"          "Local X"              "Local Y"             
  ##  [7] "Global X"             "Global Y"             "Vehicle Length"      
  ## [10] "Vehicle width"        "Vehicle class"        "Vehicle velocity"    
  ## [13] "Vehicle acceleration" "Lane"                 "Preceding Vehicle ID"
  ## [16] "Following Vehicle ID" "Spacing"              "Headway"             
  ## [19] "svel"                 "sacc"                 "PrecVehClass"
  </code></pre>
  
  <p>I didn't change the names and kept doing analyses as is. When I used <code>transform</code> of  <code>plyr</code> package, I got 2 columns for some of the variables which contained same numbers but had different names. </p>
  
  <pre><code># Determining when the lane change occured
  final.data1 &lt;- ddply(final.data1, c("`Vehicle class`", "`Vehicle ID`"), transform, 
      lane.change = c(NA, ifelse(diff(Lane) != 0, "yes", ".")))
  ordr &lt;- with(final.data1, order(`Vehicle ID`))
  final.data1 &lt;- final.data1[ordr, ]  #sort in ascending order by vehicle ID
  names(final.data1)
  ##  [1] "Vehicle class"        "Vehicle ID"           "Vehicle.ID"          
  ##  [4] "Frame.ID"             "Total.Frames"         "Global.Time"         
  ##  [7] "Local.X"              "Local.Y"              "Global.X"            
  ## [10] "Global.Y"             "Vehicle.Length"       "Vehicle.width"       
  ## [13] "Vehicle.class"        "Vehicle.velocity"     "Vehicle.acceleration"
  ## [16] "Lane"                 "Preceding.Vehicle.ID" "Following.Vehicle.ID"
  ## [19] "Spacing"              "Headway"              "svel"                
  ## [22] "sacc"                 "PrecVehClass"         "lane.change"
  </code></pre>
  
  <p>See <code>Vehicle ID</code> and <code>Vehicle.ID</code>? Why is this happening and how can I prevent this if I don't want to change original variable names?</p>