I am using the latest versions of R and R Studio on a 64 bit Windows 7 system and have successfully constructed the R program needed to complete my course project. However, I am required to turn in R markdown output as compiled html. My program runs to about 70% completion in R markdown and then throws an error that I cannot understand. I can't complete my project due to this R markdown problem.
Here's more detail:
My markdown document begins with:
---
title: 'Final Report: Prediction Assignment'
author: "Donald Chambless"
date: "June 23, 2016"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
..................................
..................................
and all of the code that follows executes correctly in R markdown until this statement:
trainingPred <- predict(RandomTreeModel, trainingData[ , -54])
This line fails in R markdown with the following error message:
Error in eval(expr, envir, enclos) : object 'accel_forearm_y' not found calls: ... predict.train -> model.frame -> model.frame.default -> eval -> eval
I don't understand what's going on. Can anyone help?
I'm a newcomer to Stack Overflow, but I hope I have explained my problem sufficiently.