Description Usage Arguments Details Value Author(s) See Also Examples
Currently primitive widget objects (pwidget
s) are implemented
as list
s, but this will change. Users should only rely
on these accessors functions, not the implementation.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
x |
list of lists with a Name, Value, toText, fromText, canEdit, buttonText, buttonFun, preFun, postFun element. |
index |
integer or character string as an index or name for the list in the first list of a list of lists for a widget. |
value |
An R data type that is going to be used to update the value. |
WName(x)
returns the Name
element of x
.
WValue(x)
returns the Value
element of x
.
WValue(x) <- value
will change the Value
element of
x
to value
.
WtoText(x)
returns the toText
element of x
.
WfromText(x)
returns the fromText
element of x
.
WcanEdit(x)
returns the canEdit
element of x
.
WbuttonText(x)
returns the buttonText
element of x
.
WbuttonFun(x)
returns the buttonFun
element of x
.
WwList(x)
returns the wList
element of x
.
WwList <- value
will update the wList
element of a
Widget list with value
.
WLValue(x, index)
returns a list indicated by the
index in the wList of a widget list.
WLValue(x, index) <- value
will update indicated
by the index in the wList of a widget list with the value.
WpreFun(x)
returns the preFun element of x
.
WpostFun(x)
returns the post element of x
.
WEnd(x)
returns the end element of x
.
A character string or R function represented by the element of the list whose value is to be retrieved.
Jianhua (John) Zhang
widgetRender
for references etc.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | # Create the list of lists
pW1 <- list(Name="AAA", Value="bbb",
toText = function(x) paste(x,collapse = ","),
fromText = NULL, canEdit = TRUE,
buttonFun = ls, buttonText = "Browse")
widget1 <- list(wList = list(a = pW1),
preFun = function() "Hi",
postFun = function() "Bye")
# Call the functions
WName(pW1)
WValue(pW1)
WValue(pW1) <- "lll"
WtoText(pW1)
WfromText(pW1)
WcanEdit(pW1)
WbuttonText(pW1)
WbuttonFun(pW1)
WwList(widget1)
WwList(widget1) <- list(Name = "New list", Value = "New value")
WLValue(widget1, 1)
WLValue(widget1, 1) <- "New value"
WpreFun(widget1)
WpostFun(widget1)
WEnd(widget1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.