get_plant_phenophase: Get phenophase information for a single plant

Description Usage Arguments Value Examples

View source: R/db_tables.R

Description

This function retrieves all phenophase data for a single plant_id. Can be subset to specific years, or specific start and end dates.

If shape = 'long' (the default) then columns will be: c('PLANT_ID','DATE','PHENOPHASE','STATUS','NOTE_FLAG','PHOTO_FLAG','SITE_CODE', 'SPP_CODE', 'FUNC_GRP_CODE')

If shape = 'wide' then all thephenophase codes will be columns.

Usage

1
2
3
4
5
6
7
get_plant_phenophase(
  plant_id,
  years = NULL,
  start_date = NULL,
  end_date = NULL,
  shape = "long"
)

Arguments

plant_id

string. unique plant identifier

years

Optional. integer or vector of integer for the years desired. years must be consecutive.

start_date

Optional. A string with format 'YYYY-MM-DD'. Get visit information from this date forward. Default is all prior dates.

end_date

Optional. A string with format 'YYYY-MM-DD'. Get visit information up to this date. Default is all dates up to todays date.

shape

string. 'wide' or 'long' for a data.frame in the respective format. default 'long'

Value

data.frame of phenophases by date

Examples

1
2
get_plant_phenophase('CRATCA01')
get_plant_phenophase('CRATCA01', start_date = '2012-01-01', end_date = '2012-12-31')

sdtaylor/phenometR documentation built on Sept. 15, 2021, 6:35 a.m.