dataViewer: Function to view a data object passed

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/dataViewer.R

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

1
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

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

Example output

Loading required package: widgetTools
Loading required package: tcltk
Loading required package: DynDoc
Loading required package: tools
Warning message:
no DISPLAY variable so Tk is not available 

tkWidgets documentation built on Nov. 8, 2020, 5:17 p.m.