History: Profile_r_test13_parse_body
Source of version: 1
- «
- »
Copy to clipboard
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} {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 :-)