Re: [R] Creating data frame of predicted and actual values in R for plotting

2016-05-11 Thread Muhammad Bilal
I have achieved this use case by writing the following commands: all_predictions <- data.frame(pid = testPFI$project_id, actual_delay = testPFI$project_delay,lm_pred, tree_pred, best_tree_pred, rf_pred) str(all_predictions) all_pred <- sqldf("SELECT pid, actual_delay, ROUND(lm_pred,2) lm_pred,

Re: [R] Creating data frame of predicted and actual values in R for plotting

2016-05-10 Thread Muhammad Bilal
Pls don't mind the typo in predict() functions for some of the models. Sent from my iPhone > On 11 May 2016, at 12:47 am, Muhammad Bilal > wrote: > > Hi All, > > > I have the following dataset: > > >> str(pfi_v3) > 'data.frame': 714 obs. of 8 variables: >

[R] Creating data frame of predicted and actual values in R for plotting

2016-05-10 Thread Muhammad Bilal
Hi All, I have the following dataset: > str(pfi_v3) 'data.frame': 714 obs. of 8 variables: $ project_id : int 1 2 3 4 5 6 7 8 9 10 ... $ project_lat: num 51.4 51.5 52.2 51.5 53.5 ... $ project_lon: num -0.642 -1.85 0.08 0.126 -1.392 ... $ sector