Convert a data.frame of WESP question responses to a wesp_site
as.wesp_site.RdRead a data.frame that has been read in by load_wesp_data()
and convert it into a wesp_site object, in preparation for
calculating the indicators. This function also calculates various
"derived" values that are used in indicator calculations.
Arguments
- data
data.frameof questions and responses, ideally created by reading in data withload_wesp_data(). Contains columnsq_no,response_no, and one or moresite_[x]columns.- site
A number, or the name of a column in
dataindicating which site to calculate, if more than one site indata. Defaults to the firstsite_[x]column.