r2datavyu: R data to Datavyu '.csv' file

Description Usage Arguments Details Examples

View source: R/exported.R

Description

Process to transfer R data to Datavyu

Usage

1
r2datavyu(rlist, directory = ".", filename = "datavyur_export")

Arguments

rlist

List of lists or data.frames. These will be the columns used in the final Datavyu file.

directory

Path to a directory that will store the newly created folder "datavyur_export" containing the .csv file and the .rb script used within Datavyu, which is needed to convert the .csv to .opf.

filename

File name of the .csv file to be created. Any extension in the file name will be removed.

Details

Exports R data (as a list of lists or data frames corresponding to Datavyu columns) to a .csv file. This can then be used by Datavyu for saving as a .opf and importing R data into Datavyu. Each list item is a different column in the final Datavyu file.
NOTE: Datavyu cannot currently import the .csv files this function creates, so a Ruby script is generated to convert the .csv file to .opf, which can be loaded into Datavyu.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
# these examples are not run to comport with CRAN policies
# First get example data to use
example_data <- fake_datavyu_data()

# See how the example data is structured, as a list with another list and data.frame
# Both the list and data.frame are named. If not named, one will be assigned.
str(example_data)

# Export R list to a .csv file for importing into Datavyu
r2datavyu(example_data, "~")

## End(Not run)

iamamutt/datavyur documentation built on Dec. 20, 2021, 5:57 p.m.