hop_filter: Filter a hop object by SimulationName, Date, and idTree

Description Usage Arguments Value See Also Examples

Description

Filters a hop object by SimulationName, Date, and idTree

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
hop_filter(
  hop,
  simu.names = "all",
  tree.ids = "all",
  years = "all",
  months = "all",
  date.min = NA,
  date.max = NA,
  dates = NULL,
  strip.exp.plan = FALSE
)

Arguments

hop

An object of class hop or face.

simu.names

A character vector of the SimulationNames to keep. If "all", no filtering occurs.

tree.ids

A numeric vector of the tree ids to keep. If "all", no filtering occurs.

years

A numeric vector of the years to keep. If "all", no filtering occurs.

months

A numeric vector of the months to keep. If "all", no filtering occurs.

date.min

A character string of the minimum date to keep, in the format "YYYY-MM-DD" or of class Date. If NA, the minimum date in hop is used. Only used if dates is NULL.

date.max

A character string of the maximum date to keep, in the format "YYYY-MM-DD" or of class Date. If NA, the maximum date in hop is used. Only used if dates is NULL.

dates

A character vector (in the format "YYYY-MM-DD") or a vector of class Date of the dates to keep. If NULL, then date.max and date.min are used instad.

strip.exp.plan

Logical indicating whether or not to remove the exp.plan variables (which are appended by read_hisafe) from each profile in hop.

Value

A hop object.

See Also

Other hisafe helper functions: copy_hisafe_template(), get_pheno_dates(), get_pruning_dates(), hip_params(), hisafe_info(), hisafe_profiles(), hop_merge(), hop_params(), hop_rename(), is_face(), is_hip(), is_hop(), join_profiles(), make_rel_years(), profile_check(), variable_check(), which_profiles()

Examples

1
2
3
4
## Not run: 
newhop <- hop_filter(myhop, c("Sim_1", "Sim_2"))

## End(Not run)

kevinwolz/hisafer documentation built on Oct. 19, 2020, 4:43 p.m.