Learn R Programming

glmmBUGS (version 2.4.2)

mergeBugsData-methods: Merge results from BUGS into a data.frame or SPDF

Description

merge the result from bugs function

Usage

# S4 method for data.frame
mergeBugsData(
x, bugsSummary, by.x = NULL, newcol = "mean", ...
)
# S4 method for SpatialPolygonsDataFrame
mergeBugsData(
x, bugsSummary, by.x = NULL, newcol = "mean", ...
)

Arguments

x

spatial polygon object i.e population data set (popdata)

bugsSummary

posterior distribution result from summaryChain function

by.x

the common term from the spatial polygon object and the bugs function result

newcol

the summary statistic that to be merged back to the data frame

additional arguments

Examples

Run this code
# NOT RUN {
if(require('diseasemapping')){
	data('popdata')
	newdata = c("3560102"=2, "3560104"=3)
	popdatatry = mergeBugsData(popdata, newdata, by.x="CSDUID")
}

# }

Run the code above in your browser using DataLab