Package 'DataGraph'

Title: Export Data from 'R' to 'DataGraph'
Description: Functions to pipe data from 'R' to 'DataGraph', a graphing and analysis application for mac OS. Create a live connection using either '.dtable' or '.dtbin' files that can be read by 'DataGraph'. Can save a data frame, collection of data frames and sequences of data frames and individual vectors. For more information see <https://community.visualdatatools.com/datagraph/knowledge-base/r-package/>.
Authors: David Adalsteinsson [aut, cre]
Maintainer: David Adalsteinsson <[email protected]>
License: GPL (>= 2)
Version: 1.2.14
Built: 2025-02-23 03:45:37 UTC
Source: https://github.com/cran/DataGraph

Help Index


Export Data from R to DataGraph

Description

Transfers data from 'R' to 'DataGraph'. Save either .dtable or .dtbin files that can be read by 'DataGraph', a graphing and analysis application for MacOS. Can save a data frame, collection of data frames and sequences of data frames and individual vectors.

Details

There is a total of eight functions in this package One step to save a data frame into a .dtable file writeDTable(path name,data frame)

To save multiple data frames into a single .dtable file openDTable(path name) addDTable(path name,data frame) closeDTable(path name)

To save a .dtbin file, which can contain multiple lists and data frames by name and each one can be a sequence saved by "time" openDTBin(path name) addDTBin(path name,entry name,data (frame or column),time (optional)) infoDTBin(path name) : Prints out the current content of the file closeDTBin(path name)

Author(s)

David Adalsteinsson

Maintainer: David Adalsteinsson <[email protected]>

Examples

## Not run: 
     writeDTable("/tmp/test",mtcars)

     openDTable("/tmp/test2")
     addDTable("/tmp/test2",data frame)
     ...  modify the table
     addDTable("/tmp/test2",data frame)
     closeDTable("/tmp/test2")

     openDTBin("/tmp/test3")
     addDTBin("/tmp/test3","Cars",mtcars)
     addDTBin("/tmp/test3","Orange",Orange)
     infoDTBin("/tmp/test3")
     closeDTBin("/tmp/test3")
  
## End(Not run)

Save a data frame to a .dtable file

Description

Adds a table to an already open table file. Need to open it first by using the openDTable function.

Usage

addDTable(path,data)

Arguments

path

A path name

data

A data frame

Value

Nothing returned

Examples

## Not run: 
openDTable("/tmp/test")
addDTable("/tmp/test",Orange)
closeDTable("/tmp/test")

## End(Not run)

Save a data frame to a .dtable file

Description

Adds the data into a .dtbin file.

Usage

addDTBin(path,name,data,time)

Arguments

path

A path name

name

The name of the variable

data

Either a data frame or a vector

time

optional: What time value this variable is at

Value

Nothing returned

Examples

## Not run: 
openDTBin("/tmp/test")
addDTBin("/tmp/test","A",Orange)
closeDTBin("/tmp/test")

## End(Not run)

Save a data frame to a .dtable file

Description

Closes a .dtable file

Usage

closeDTable(path)

Arguments

path

A path name

Value

Nothing returned

Examples

## Not run: 
openDTBin("/tmp/test")
addDTBin("/tmp/test","A",Orange)
closeDTBin("/tmp/test")

## End(Not run)

Close a .dtbin file

Description

Closes a .dtbin file

Usage

closeDTBin(path)

Arguments

path

A path name

Value

Nothing returned

Examples

## Not run: 
openDTBin("/tmp/test")
addDTBin("/tmp/test","A",Orange)
closeDTBin("/tmp/test")

## End(Not run)

Save a data frame to a .dtable file

Description

Displays the content of a .dtbin file

Usage

infoDTBin(path)

Arguments

path

A path name

Value

Nothing returned, but data is printed to the console. Intended as a debugging aid.

Examples

## Not run: 
openDTBin("/tmp/test")
addDTBin("/tmp/test","A",Orange)
infoDTBin("/tmp/test")
closeDTBin("/tmp/test")

## End(Not run)

Open a .dtable file so you can write into it using addDTable

Description

Saves the data frame to a file

Usage

openDTable(path)

Arguments

path

A path name

Value

Nothing returned

Examples

## Not run: 
openDTable("/tmp/test")
addDTable("/tmp/test",Orange)
closeDTable("/tmp/test")

## End(Not run)

Open a new .dtbin file

Description

Opens a .dtbin file. Prints out an error message if the file is already open.

Usage

openDTBin(path)

Arguments

path

A path name

Value

Nothing returned

Examples

## Not run: 
openDTBin("/tmp/test")
addDTBin("/tmp/test","A",Orange)
infoDTBin("/tmp/test")
closeDTBin("/tmp/test")

## End(Not run)

Adds a .sync file with the same name as the .dtable file.

Description

Used so that DataGraph can read up to an internal boundary inside the data file and avoids reading a partial table. DataGraph monitors this file and reloads the file when it sees a new sync file.

Usage

syncDTable(path)

Arguments

path

A path name

Value

Nothing returned

Examples

## Not run: 
openDTable("/tmp/test")
addDTable("/tmp/test",Orange)
syncDTable("/tmp/test")
addDTable("/tmp/test",Orange)
closeDTable("/tmp/test")

## End(Not run)

Adds a .sync file with the same name as the .dtbin file.

Description

Used so that DataGraph can read up to an internal boundary inside the data file and avoids reading a partial table. DataGraph monitors this file and reloads the file when it sees a new sync file.

Usage

syncDTBin(path)

Arguments

path

A path name

Value

Nothing returned

Examples

## Not run: 
openDTBin("/tmp/test")
addDTBin("/tmp/test","Orange",Orange)
syncDTBin("/tmp/test")
addDTBin("/tmp/test","Orange",Orange)
closeDTBin("/tmp/test")

## End(Not run)

Save a data frame to a .dtable file

Description

Saves the data frame to a file

Usage

writeDTable(path,data)

Arguments

path

A path name

data

A data frame

Value

Nothing returned

Examples

## Not run: 
writeDTable("/tmp/test",Orange)

## End(Not run)