OpenInProgram: OpenInProgram

View source: R/OpenInProgram.R

OpenInProgramR Documentation

OpenInProgram

Description

Transfers a data.frame to ncplot or Xanadu or a Excel/libreoffice spreadsheet for analysis.

Usage

OpenInProgram(
  Data,
  Program = "ncplot",
  dataDirectory = sprintf("%s/R", DataDirectory()),
  netCDFfileName = "RtoXanadu",
  warnOverwrite = TRUE,
  openProgram = TRUE
)

Arguments

Data

The data.frame containing the variables that will be transferred for use in Xanadu. This data.frame should have attributes preserved from the original netCDF file; otherwise, 'makeNetCDF()' which is called by this function will fail. The data.frame must always contain the Time variable but can contain only a subset of the variables and times in the original file. The function Ranadu::RSubset() can be used to construct subsets while preserving attributes.

Program

A character string with the name of the program. Default is "ncplot".

dataDirectory

A directory into which the netCDF file containing data from this data.frame will be written. The default will be a subdirectory named 'R' in the main data directory specified by Ranadu::DataDirectory().

netCDFfileName

The character string representing a name for the netCDF data file that will be created. The file will be created in 'dataDirectory'.

warnOverwrite

A logical variable that can be set FALSE to suppress warnings about overwriting existing data files. Overwriting will then occur silently.

openProgram

A logical parameter, with default of TRUE, that will open an X window for access to Xanadu routines. If FALSE, Xanadu will not be started but system calls like 'system("Xanadu tracy")' can be used then to process the new netCDF file in batch mode.

Details

ncplot is a widely used plotting program supported by NCAR/EOL. Xanadu is a legacy package for data analysis. This function writes a specified data.frame to a netCDF file (for ncplot or Xanadu) or a CSV-format file (for Excel/libreoffice) and opens the appropriate program with that file. This is a mechanism to use some of the ncplot capabilities for plots or the Xanadu special capabilities like those for spectral analysis, for constructing vertical sections and sounding plots, and for producing plots using python routines with python code that can be tailored for special needs. It also supports production of CSV-format files that include all the variables in the supplied data.frame.

Value

None

Author(s)

William Cooper

Examples

## Not run: OpenInProgram (RAFdata, "ncplot", ".", "RAFdata4Xanadu")

NCAR/Ranadu documentation built on Jan. 27, 2023, 1:09 a.m.