get_plants_nb {SticsRFiles}R Documentation

Getting plants number per usm for all usms or selected from a usm name vector

Description

Extracting plant number from usms.xml or new_travail.usm file data

Usage

get_plants_nb(
  usms_file,
  usms_list = c(),
  usm_file_path = lifecycle::deprecated()
)

Arguments

usms_file

Path (including name) of a USM xml file or of a new_travail.usm file

usms_list

Usm(s) name(s) (optional, see details)

usm_file_path

[Deprecated] usm_file_path is no longer supported, use usms_file instead.

Details

Use get_usms_list() to get the list of the usm names for an usms.xml file.

Value

A named numeric vector of plants number per usm

Examples

# Xml case
xml_usms <- file.path(get_examples_path(file_type = "xml"), "usms.xml")
get_plants_nb(xml_usms)
get_plants_nb(xml_usms, "wheat")
get_plants_nb(xml_usms, c("wheat", "intercrop_pea_barley"))

# Txt case
txt_usm <- file.path(get_examples_path(file_type = "txt"), "new_travail.usm")
get_plants_nb(txt_usm)


[Package SticsRFiles version 1.3.0 Index]