Database Reference
In-Depth Information
PostgreSQL Data Type
R Data Type
int2, int4
Integer
int8, oat4, oat8, cash, numeric
Numeric
Byte
Object
Everything else
Character
One-dimensional arrays
Multi-element R vectors
Two-dimensional arrays
R matrices
Three-dimensional arrays
Three-dimensional R arrays
Composite types
R data frames
The following code sample is an example for the PL/R version of the R code in the
above section (DBI connector for R):
CREATE OR REPLACE FUNCTION tsp_tour_length()
RETURNS float8 AS
$$
require(TSP)
require(fields)
Search WWH ::




Custom Search