Last data update: 2014.03.03

R: Function to view a data object passed
dataViewerR Documentation

Function to view a data object passed

Description

This function creates a widget to allow users to view the content of a data frame passed and decide whether to save the data or not.

Usage

dataViewer(data, caption = "", save = TRUE)

Arguments

data

data a data frame (or alike) to be viewed

caption

caption a character string for the title of the widget

save

save a boolean to indicate whether to have the option to allow users to save the data

Details

Taking a data frame as one of the arguments, this function builds a widget that allows users to view the content of the data and save the data as a file.

Value

This function does not return any value

Author(s)

Jianhua Zhang

References

R tcltk

See Also

importWizard

Examples

# Create matrix
data <- matrix(1:20, ncol = 4)
if(interactive()){
    # View data using dataViewer
    dataViewer(data, "test", TRUE)
}

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(tkWidgets)
Error in library(tkWidgets) : there is no package called 'tkWidgets'
Execution halted