importWizard(filename = "", maxRow = 400)
initImportWizard(env)
getTopCan(base, env)
getAFrame(base, env)
finish(env)
getState1Frame(base, env)
setState1BFrame(frame, env)
setState1TFrame(frame, viewer, delims, env, startList)
showData4State1(widget, env)
setState1MFrame(frame, env, dataViewer)
getState2Frame(base, env, state = "state2", reset = FALSE)
setState2MFrame(frame,env)
setSepRadios(frame, env, state = "state2")
setQuoteList(frame, env)
setQuote(listBox, env, state = "state2")
setState2BFrame(frame, env)
showData4State2(canvas, env, state = "state2")
getState3Frame(base, env)
setState3TFrame(frame, env)
setState3BFrame(frame, env)
getName4Data(filename, objType)
writeCol4Matrix(tempFrame, dataFile, colInfos, env)
popStartLine(startList, env)
readFileByLines(filename)
filename
a character string for the name of the
file to be imported. The default is an empty string and users have to
click a browse button to get the file name through
fileBrowser
maxRow
an integer for the maximum number of rows
of the data file to be imported to be shown on the widget. The
default is 200 rowsenv
an R environment object for storing the required
informationbase
a tcltk window to hold a canvas on the top and
frames in the bottomframe
a tcktl frameviewer
a tkwin object for a widgetdelims
a character string for a file separaterwidget
a tcltk widgetstate
a character string for the state of
importing processlistBox
a tcltk list boxcanvas
a tcltk canvastempFrame
a tcltk frame that will be used to
hold widget elementsdataFile
a data matrix holding data to be
displayedcolInfos
an object of class colInfo with a
name, type, and drop slotreset
a boolean that is TRUE when the window needs
to be resetdataViewer
a tkwin object for a list boxobjType
a character string indicating the data
type of an object to be saved. Defaulted to "object"startList
a tk text box objectgetTopCan
returns a tcltk canvas.getAFrame
returns a tcltk frame.finish
returns a data.frame.getState1Frame
returns a tcltk frame with several
widgets.setState1BFrame
returns the tkwin object of list box.getState2Frame
returns a tcltk frame with several
widgets.getState3Frame
returns a tcltk frame with several
widgets.getName4Data
returns a character string for the name of
a file to be saved.
importWizard
mimics the interface of MS Excel and
collects arguments for the function read.table
. Due to
performace concern, a maximum number of rows (maxRow) set by
users will be displayed. Overly long data set may cause slow response
of the system. initImportWizard
initializes the interface for
importWizard by creating a widget with an empty top canvas and bottom
frame filled with four buttons.
getTopCan
Creates a canvas that is going to be filled by
a frame created by other functions depending on the state of the
importing process.
getAFrame
Gets a frame for the canvas created by
initImportWizard
based on the current state of importing
process.
finish
Finishes the importing process and returns a data
frame read from a file using read.table
.
getState1Frame
Returns a tcltk frame containing a list
box to show a data file read by readLines
and widgets
for user imports.
setState1BFrame
Fills the bottom frame of the frame
created by getState1Frame
with a list box.
setState1TFrame
Fills the top frame of the frame
created by getState1Frame
with a list box.
showData4State1
Populates a tcltk list or text widget
with data read using readLines.
setState1MFrame
Fills the mid frame of the frame
created by getState1Frame
.
getState2Frame
Returns a tcltk frame containing a canvas
to show a data file read by read.table
and widgets
for user imports.
setState2MFrame
Fills the mid frame of the frame
created by getState2Frame
.
setSepRadios
Renders radio buttons for options of file
separators in the frame created by setState2MFrame
.
setQuoteList
Renders the selection list for the quote
used by a data file in the frame created by
setState2MFrame
.
setQuote
Sets the value when a user has selected the
quote used by a data file.
setState2BFrame
Fills the bottom frame of the frame
created by getState2Frame
with a canvas.
showData4State2
Populates the canvas created by
setState2BFrame
using data read by
read.table
.
getState3Frame
Returns a tcltk frame containing a canvas
to show a data file read by read.table
and widgets
for user imports.
setState3TFrame
Fills the top frame of the frame
created by getState3Frame
.
setState3BFrame
Fills the bottom frame of the frame
created by getState3Frame
.
getName4Data
Takes user input for a file name using a
widget.
writeCol4Matrix
Creates a tcltk frame with list boxes as
columns displaying data of a data matrix.
fileBrowser
, argsWidget
if(interactive()){
importWizard()
}
Run the code above in your browser using DataLab