Hi I'm running an Rscript with PHP exec and it is behaving strangely.......It launches R but throws an error at the following line:-
filein = filein[,c("id","bank","trans_date","description","description_2",
"description_3","description_4","description_5" ,"type",
"debit","credit","statement_balance", "cleared_balance",
"debit_int_rate","credit_int_rate","category")]
This simple rearranges the columns in a data-set.
It throws the following error:-
Error in
[.data.frame`(filein, , c("id", "bank", "trans_date", "description",
: undefined columns selected
However I run the same script from command-line it runs without any error.
(I'm running the Rscript on a ubuntu 14.04 machine with PHP5......also when I run the same script on a windows machine from PHP it also runs perfectly)
Anybody have any ideas why this is?