! Wiki page R trial -= example with just =- With data between r tags, attId=1 {R()}1:10{R} --- -= example with csv=- attId=2. csv file with csv extension. data separated with commas -= example with csv=- {CODE()} {R(attId=2,type="text/csv")}summary(data) x <- t(data[4]); y <- t(data[5]); x y # plot(x,y); {R} {CODE} {R(attId=2,type="text/csv")}summary(data) x <- t(data[4]); y <- t(data[5]); x y # plot(x,y); {R} --- -= example with xml=- attId=6. xml file with xml extension. {CODE()} {R(attId=6,type="text/xml")}# n_calibrations <- length(which(data[ "event/@action" ] == "Trap Calibrated")) data # n_calibrations <- length(which(data[ "event/@action" ] == "Trap Calibrated")) # n_calibrations {R} {CODE} {R(attId=6,type="text/xml")}# n_calibrations <- length(which(data[ "event/@action" ] == "Trap Calibrated")) data # n_calibrations <- length(which(data[ "event/@action" ] == "Trap Calibrated")) # n_calibrations {R} !!- xml file contents {CODE(colors=>XML)} The Tweezers applet (1.0 (May 28th, 2009)) is started. {CODE} !! --- without data. attId=3, same as att2 but renamed as txt? {R(attId=3)}summary(data){R} --- without data. attId=4. semicolon instead of commas {R(attId=4)}summary(data){R} --- without data. attId=5. simple r syntax 1:20 {R(attId=5)}summary(data){R} --- {CODE()} {R()} # Summit Cr. fluvial geomorph data sumcr.csv (external link) — download and save to working directory sumcr <- read.csv("http://localhost/trunk/tiki-download_item_attachment.php?attId=3&display") # get some summary statistics for the data set summary(sumcr) # plot water-surface width vs. cumulative length downstream #attach(sumcr) #plot(CumLen, WidthWS) # add a summarizing curve #lines(lowess(CumLen, WidthWS), col="red") {R} {CODE}