Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

setArgsList

Functions to support importWizard


Description

The functions are to support importWizard and may not have much practical use otherwise.

Usage

setArgsList(filename, env, isFile = TRUE, init = TRUE)
whatDeli(delimiter)
getMoreArgs()
assignArgs(value, env)
getArgs(env)
assignShowNum(value, env)
getShowNum(env)
assignCState(value, env)
getCState(env)
assignColInfo(value, env)
getColInfo(env)
setColInfos(types, env)
changeState(canvas, backBut, nextBut, env, forward = TRUE, endBut, viewBut)
setNewState(env, backBut, nextBut, forward = TRUE, endBut, viewBut)
addArgs(env)
dropArgs(env)
setSkip(widget, env, state = "state1")
moreArgs(env)
dropColumn(index, env)
setColName(index, entryBox, env)
setColType(index, entryBox, env)
assignLineData(lineData, env)
getLineData(env)

Arguments

filename

filename a character string for the full name of a file

env

env an R environment object for storing information

delimiter

delimiter a character string for the delimiter whose letter representation is sought

value

value a character or numerical value to be assigned to a variable

backBut

backBut a tkwin object for the button that shifts back to the previous state

nextBut

nextBut a tkwin object for the button that shifts to the next state

forward

forward a boolean indicating the direction of state change

widget

widget a tcltl widget

state

state a character string for the state of importing process

index

index an integer for the index of the list for column information

entryBox

entryBox

a tcltk entry box.

canvas

canvas a tcltk canvas

types

types a vecter of string indicating the types of data columns

lineData

lineData a vector of character strings read in using readLines

endBut

endBut a tkwin object for the button that ends the process when pressed

viewBut

viewBut a tkwin object for the button that refresh the window when pressed

init

init a boolean that is TRUE when the widget is first set up and FALSE otherwise

isFile

isFile a boolean that is TRUE if fileName is a file

Details

setArgsList calls function guess.sep to figure out the the header, sep, and data type of a file and sets the values for argument list and colInfo.

whatDeli gets the word representation of delimiters (e.g. tab for "\t").

getMoreArgs generates a widget using widgetTools to collect some of the arguments for read.table.

assignArgs updates "argsList" stored in a predefined environment.

getArgs Gets "argsList" from a predefined environment.

assignShowNum Updates the value for "showNum" (number of rows to show in the interface.

getShowNum Gets the value for "showNum" (number of rows to show in the interface.

link{assignCState} Updates the value of "currentState" that is stored in a predefined environment.

getCState Gets the vlaue of "currentState" that is stored in a predefined environment.

assignColInfo Updates the values of "colInfos" (column information) that is stroed in a predefined environment.

getColInfo Gets the values of "colInfos" (column information) that is stroed in a predefined environment.

setColInfos Creates colInfo objects and sets the value of 'colInfos' list.

changeState changes the state and thus the interface of a widget.

setNewState sets the state of a importing process.

addArgs adds a new state to the argument list for states.

dropArgs removes a state from the argument list for states.

setSkip Sets the value for the number of lines to skip when readling a data file.

moreArgs Gets some of the arguments for importing data using read.table.

dropColumn Sets the index values for data columns that are going to be droped when read using read.table.

setColName Sets the column names for a data file by getting column names from correct entry boxes.

setColType Sets the column type for a data file by getting column type information from correct entry boxes.

Value

whatDeli returns a character string.

getMoreArgs returns a list of arguments.

getArgs returns a list of the arguments for read.table.

getShowNum returns an integer for the number of rows to show.

getCState returns a character string for the current state.

getColInfo returns a colInfo object contains column information.

Author(s)

Jianhua Zhang

See Also

Examples

# No example is given as functions require the set up of the working
  # environment.

tkWidgets

R based tk widgets

v1.68.0
Artistic-2.0
Authors
J. Zhang <jzhang@jimmy.harvard.edu>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.