History: Profile_r_test13_parse_body
Source of version: 2
Copy to clipboard
! Unfinished work. Alfa state. This page first of all produces a simple barchart using conventional R body content ie with {R(bg="yellow")} abundance <- matrix(c(8, 4, 7),ncol=3,byrow=TRUE); colnames(abundance) <- c("Jan","Feb","Mar"); rownames(abundance) <- c("total abundance"); abundance; barplot(abundance); {R} !! Using Ajax services http://localhost/tiki-ajax_services.php?controller=tracker&action=export_items&trackerId=2&encoding=UTF-8&separator=%2C&delimitorL=%22&delimitorR=%22&CR=%25%25%25&listfields[]=9&listfields[]=10&recordsMax=-1 !! Using TrackerList {trackerlist trackerId=2 fields="9:10:11" list_mode=csv max=4 showpagination="n" wiki=r_demo13_template} The numbers 8,4,7 are then generated from a tracker using a simple wiki template and a trackerlist substituted into the body content as follows {R(bg="yellow" parse_body="y" echodebug=1)} abundance <- matrix(c({trackerlist trackerId=2 fields="9:10:11" list_mode=csv max=4 showpagination="n" wiki=r_demo13_template}),ncol=3,byrow=TRUE); colnames(abundance) <- c("Jan","Feb","Mar"); rownames(abundance) <- c("total abundance"); abundance; barplot(abundance); {R} In the above the echodebug now shows the body content both pre and post parsing so that it can be checked. So now that you can generate output from a tracker using a trackerlist plugin, or for more flexibility using the list plugin, then a lot more options become possible with R :-)