[R] LDA Precdict - Seems to be predicting on the Training Data

2009-10-20 Thread BostonR
When I import a simple dataset, run LDA, and then try to use the model to forecast out of sample data, I get a forecast for the training set not the out of sample set. Others have posted this question, but I do not see the answers to their posts. Here is some sample data: DateNames v1

[R] Updating DataFrame with Function

2009-07-24 Thread BostonR
This should be very simple but I am wrestling with updating a data frame from within a function. Here is a simple example: ### SET UP DATA FRAME > tFrame <- data.frame(T=c(1:5)) > > tFrame T 1 1 2 2 3 3 4 4 5 5 > # Simple function that updates with 1000 > tUpdate<- function (x){ + tFrame$