hsDbTablePlotXY: X-Y Plot of Two Database Table Fields

View source: R/hsLibBase.R

hsDbTablePlotXYR Documentation

X-Y Plot of Two Database Table Fields

Description

Plots the values of two database fields (= columns) against each other and prints the plot into a PDF file.

Usage

hsDbTablePlotXY(strDb, strTable, strX, strY, strPdfFile = NULL)

Arguments

strDb

full path to MS Access database file (*.mdb)

strTable

name of table in database

strX

name of table field containing the "x" values

strY

name of table field containing the "y" values

strPdfFile

full path to PDF file to be generated. If omitted, the plot is shown on the screen.

Value

If the output device is a pdf file the result of the dev.off() command is returned.

Examples

## Not run: 
## Plot CSB vs. timestamp values from table "tbl_STA_CAL" in the
## example database into a window on the screen
hsDbTablePlotXY(kwb.db::xmdb(), "tbl_Qua", "myDateTime", "CSB")

## Set paths to a test PDF file
pdf_file <- file.path(tempdir(), "ex_hsDbTablePlotXY.pdf")

## Plot CSBf vs. timestamp values from the same table into a PDF file.
hsDbTablePlotXY(kwb.db::xmdb(), "tbl_Qua", "myDateTime", "CSBf", pdf_file)

## Open PDF file in PDF viewer
kwb.utils::hsShowPdf(pdf_file)

## End(Not run)

KWB-R/kwb.base documentation built on June 19, 2022, 3:30 a.m.