R/stdType.R

Defines functions stdView stdType

Documented in stdType stdView

# These functions provide standard outputs that are going to be
# rendered to a widget to indicate the type or value of the R object
# shown on the widget.
#
# Copyright 2002, J. Zhang. All rights reserved
#

##what is formular????
##is this really what you want?? shouldn't it always use a class if 
##there is one? 
stdType <- function(toCheck){
    if(inherits(toCheck, "formular")){
        return("formula")
    }else{
        return(mode(toCheck))
    }
}

stdView <- function(toView){
    if(inherits(toView, "formular")){
        toView <- format(toView)
    }
    objViewer(toView)
}

Try the tkWidgets package in your browser

Any scripts or data that you put into this service are public.

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