I am trying to integrate an R-Script in HANA and for this, I am getting some dataframes from HANA sent to my R-Script to work with it. Problem hereby is, that i can't read the Dataframe correctly and I don't know why.
I am getting an factor, which should be converted to a Date It has the form
"May 31,2017"
year1<-as.numeric(format(as.Date(dataframe[1,1],format= '%B %d,%Y'), '%Y))
So I am Saving the year of the Date I am getting from HANA. Then I am trying to run a sequence from this year to another.
seq(from=year1,to=year1+5,by=1)
For this I am getting the error message:
"from must be of length 1"
I already saved the file from HANA as an CSV and ran it locally, for this it works like that. But not on HANA. Is this an HANA specific problem or is my code wrong?
I also tried using the substring command to filter just the last 4 characters, and there i am also getting the same error.
I would be really grateful if someone could help me with this problem.