Skip to Content

en PL/R

  1. CREATE OR REPLACE FUNCTION f_graph() RETURNS text AS
  2. '
  3. str <<- pg.spi.exec (''select x as "mon a" ,y as "mon b" from temp order by x,y'');
  4. pdf(''monplot.pdf'');
  5. plot(str,type="l",main="Démonstration",sub="Graphique");
  6. dev.off();
  7. print(''OK'');
  8. '
  9. LANGUAGE plr;