I am trying to use the R function from a R package (https://cran.microsoft.com/snapshot/2017-04-03/web/packages/genasis/index.html) directly in Postgres without rewriting the function again, so it could be like:
CREATE OR REPLACE FUNCTION funcname (int x,date date_start,date date_end,text input,text output,text method,int days,text pollutant, numeric temp, numeric wind))
RETURNS float AS
The_R_fuc_result = package_name.function_name(parmas...)
return(The_R_fuc_result)
LANGUAGE 'plr';
I found that all cases rewrite the functions or copy pest the content of the functions. Thanks