Learn R Programming

FIESTA (version 3.6.4)

datPBpnt2pct: Data - Transpose point data to plot-level percent by domain.

Description

Calculates percent point by plot and domain and transpose to plot level.

Usage

datPBpnt2pct(pnt, uniqueid, tvar, othervars = NULL)

Value

pltdom.pct

Data frame with transposed data.

Arguments

pnt

DF/DT or comma-delimited file (*.csv). Point-level table with one record per point. If NULL, aggregated point counts must be in pntcnt.

uniqueid

String. Name of unique identifier of plot in pnt.

tvar

String. Name of variable to transpose.

othervars

String vector. Name(s) of plot-level variables to merge with transposed data.

Author

Tracey S. Frescino

Examples

Run this code
# Load necessary data from FIESTA
## Point data
icepntfn <- system.file("extdata",
                        "PB_data/icepnt_utco1135.csv",
                         package = "FIESTA")
icepnt <- read.csv(icepntfn)

# Convert to percent
percent <- datPBpnt2pct(pnt = icepnt,
                        uniqueid = "plot_id",
                        tvar = "cover_1")
head(percent)

Run the code above in your browser using DataLab