process.data.cafe: Process data from a single treatment prior to making a vector...

Description Usage Arguments Value Functions Examples

View source: R/vector_plotting.R

Description

These functions take the data generated by pairwise.price() and processes it into the terms needed in CAFE, BEF, or Price component vector plots.

Usage

1
2
3
4
5
process.data.cafe(data, group.vars = NULL, standardize = TRUE)

process.data.bef(data, group.vars = NULL, standardize = TRUE)

process.data.price(data, group.vars = NULL, standardize = TRUE)

Arguments

data

Pairwise Price data

group.vars

A vector of grouping variables, if any

standardize

Should ecosystem function values be standardized against baseline? T/F

Value

A list of three data sets with different levels of aggregation used in subsequent vector plots. Although still exported, this function has become essentially an internal function, called by members of the leap.zig family of functions, and may rarely be useful to call directly.

Functions

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# write one
set.seed(36)

# Data frame containing multiple communities we want to compare
cms<-data.frame(comm.id=sort(rep(seq(1,3),6)),
                species=rep(LETTERS[seq(1,6)],3),
                func=rpois(6*3,lambda = 2))
                
#Identify one (or more) grouping columns
cms<-group_by(cms,comm.id)

# Perform pairwise comparisons of all communities in cms identified by comm.id
pp<-pairwise.price(cms,species='species',func='func')
pp<-group.columns(pp,gps=c('comm.id'))

process.data.cafe(data=pp,group.vars='comm.id')
process.data.bef(data=pp,group.vars='comm.id')
process.data.price(data=pp,group.vars='comm.id')
   

ctkremer/priceTools documentation built on May 28, 2019, 7:49 p.m.