Changes

Jump to navigation Jump to search
=== Attempts to call R built-in function from PSQL ===
 
==== Regression ====
 
Creating Function:
 
CREATE OR REPLACE FUNCTION r_reg(y numeric[], x numeric[])
RETURNS numeric AS $$
res <- lm(y ~ x)
return(coef(res)[1])
$$ LANGUAGE 'plr' immutable;
 
Calling Function:
 
SELECT *
== hcllayerwinv table from tigertest database ==
337

edits

Navigation menu