Learn R Programming

RSurvey (version 0.7-0)

ViewData: View Data

Description

A GUI for viewing table formatted data.

Usage

ViewData(d, column.names = NULL, column.units = NULL,
         column.formats = NULL, parent = NULL)

Arguments

d
data.frame; the data used to populate the table.
column.names
character; a vector giving the column names for the data table (optional).
column.units
character; a vector giving the measurement units for each column of the data table (optional).
column.formats
character; the conversion specification format (optional).
parent
tkwin; the GUI parent window.

Details

Column titles are a concatenation of variables column.names and column.units. Row titles are taken from the row names attribute of d. Pattern searches are performed using grep with GUI options available for setting its fixed and perl arguments.

See Also

tclArray, row.names

Examples

Run this code
tclRequire("Tktable", warn = TRUE)

n <- 1000
V1 <- sample(c(1:9, NA), n, replace = TRUE)
V2 <- sample(LETTERS, n, replace = TRUE)
V3 <- as.POSIXct(rnorm(n, mean = 0, sd = 1e6), origin = "2010-01-01")
V4 <- sample(V1 * pi, n)
d <- data.frame(V1, V2, V3, V4)
column.names <- c("Integers", "Letters", "DateTime", "Numeric")
column.units <- c("units", NA, NA, NA)
column.formats <- c("%d", "%s", "%m/%d/%Y %H:%M", NA)
ViewData(d, column.names, column.units, column.formats)

row.names(d) <- 1:n + n
ViewData(d, column.names, column.formats = column.formats)

Run the code above in your browser using DataLab