[rkward-cvs] SF.net SVN: rkward:[3625] branches/jss_dec_10/examples/demo.R

sjar at users.sourceforge.net sjar at users.sourceforge.net
Thu May 26 07:51:56 UTC 2011


Revision: 3625
          http://rkward.svn.sourceforge.net/rkward/?rev=3625&view=rev
Author:   sjar
Date:     2011-05-26 07:51:56 +0000 (Thu, 26 May 2011)

Log Message:
-----------
updated demo

Modified Paths:
--------------
    branches/jss_dec_10/examples/demo.R

Modified: branches/jss_dec_10/examples/demo.R
===================================================================
--- branches/jss_dec_10/examples/demo.R	2011-05-26 07:30:08 UTC (rev 3624)
+++ branches/jss_dec_10/examples/demo.R	2011-05-26 07:51:56 UTC (rev 3625)
@@ -16,16 +16,14 @@
 ## Figure 2
 my.data <- data.frame (var=numeric (1), var1=factor (1), var2=character (1), var3=logical (1), stringsAsFactors=FALSE)
 rk.sync.global ()
-#Interactive console with syntax highlighting
+
 f <- function () {
       print ("Interactive console with syntax highlighting")
    }
    f ()
-#show an S4 object in workspace browser, source: help {utils}
-## define a S4 generic function and some methods
-combo <- function(x, y) c(x, y)
-setGeneric("combo")
-setMethod("combo", c("numeric", "numeric"), function(x, y) x+y)
+setClass ("demoClass", representation=list (slotA="numeric", slotB="character", slotC="list"), contains="data.frame")
+s4.demo.object <- new ("demoClass")
+s4.demo.object at slotC <- list (a=1, b=2)
 
 ok.to.proceed ("<b>Replication of Figure 2</b>:<br>The object \"my.data\" has been created in the global environment.<br><br>
 Click on the \"Workspace\" button in the left tool view to show object information in the workspace browser.


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rkward-tracker mailing list