seasonder_exportCSVMUSICTable {SeaSondeR}R Documentation

Export MUSIC Table to CSV

Description

This function exports the MUSIC detection table from a SeaSondeRCS object to a CSV file.

Usage

seasonder_exportCSVMUSICTable(seasonder_cs_object, filepath)

Arguments

seasonder_cs_object

A SeaSondeRCS object containing MUSIC detection data.

filepath

A character string specifying the path to the output CSV file.

Details

This function performs the following steps:

  1. Generates a MUSIC table using seasonder_exportMUSICTable.

  2. Converts the resulting table to a data frame.

  3. Writes the data frame to the specified CSV file using data.table::fwrite.

Value

The function returns NULL invisibly. The output is saved to the specified file.

See Also

Examples

  # Prepare a SeaSondeRCS object for examples, including APM
  apm_file <- system.file("css_data/MeasPattern.txt", package = "SeaSondeR")
  apm_obj <- seasonder_readSeaSondeRAPMFile(apm_file)
  specs_path <- seasonder_defaultSpecsFilePath("CS")
  cs_obj <- seasonder_createSeaSondeRCS(
    system.file("css_data/CSS_TORA_24_04_04_0700.cs", package = "SeaSondeR"),
    specs_path = specs_path,
    seasonder_apm_object = apm_obj
  )
cs_obj <- seasonder_initMUSICData(
 cs_obj,
 range_cells = c(rep(5,11), rep(4,11)),
 doppler_bins = c(c(669:679),c(674:684))
)
cs_obj <- seasonder_runMUSIC(cs_obj)
  # Export MUSIC table to a temporary CSV file
  tmpfile <- tempfile(fileext = ".csv")
  seasonder_exportCSVMUSICTable(cs_obj, tmpfile)
  print(tmpfile)

[Package SeaSondeR version 0.2.8 Index]