title: Error on train() function in R
body: <p>I am trying to learn from an online example and got stuck on one part. Particularly when i use train() function. I got an error saying train isn't a function. I did research and believe train is a function.
  The code i copied was : 
      xgb_tree_model =  train(SalePrice~., data=train, method="xgbTree", trControl=control, tuneGrid=grid, metric="rmsle", maximize = FALSE) </p>
  
  <p>The site I am using is <a href="http://hamelg.blogspot.com/2016/09/kaggle-home-price-prediction-tutorial.html" rel="nofollow noreferrer">http://hamelg.blogspot.com/2016/09/kaggle-home-price-prediction-tutorial.html</a></p>