0

I want to display data frame table in a new window using Tcl Tk tool. ´tktable´ must be the solution but I don't know how to use it with data frame. Can anyone show me how?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
David
  • 4,785
  • 7
  • 39
  • 63

1 Answers1

1

Is this what you want:

library( gWidgets )
x <- data.frame( a = runif( 20 ), b = runif( 20 ) * 100, c = rnorm( 20 ), 
                 d = sample( LETTERS, 20 ), e = 1000:1019, f = rep( "Table Test", 20 ) )

win <- gwindow( "Table", visible = FALSE )
table <- gtable( x, cont = win )
visible( win ) <- TRUE
vaettchen
  • 7,299
  • 22
  • 41