-
Notifications
You must be signed in to change notification settings - Fork 0
rli_database_read
Joona Lehtomäki edited this page Jan 9, 2013
·
10 revisions
source("R/postgresql.R")
install.deps()
For examples, see https://code.google.com/p/rpostgresql/
con <- connect.rli("R/config.R")
habitat <- fetch.rli.data(con, table="habitat") habitat.threat <- fetch.rli.data(con, table="habitat_threat") imp <- fetch.rli.data(con, table="implementation") prog.targets <- fetch.rli.data(con, table="programme_targets") progs <- fetch.rli.data(con, table="programmes") threat <- fetch.rli.data(con, table="threat")
imp <- merge(imp, progs)
imp.by.prog <- ddply(imp, c("ProgrammeID", "LongDesc"), summarise, total_euros = sum(Euros), total_ha = sum(Hectares))