Loading...
 
Skip to main content

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   :-)
 
        

History

Information Version
Wed 20 of Jan, 2016 16:24 GMT-0000 Xavi (as xavidp - admin) updated info in a quick & dirty way 17
Wed 22 of Jul, 2015 12:12 GMT-0000 Xavier de Pedro rpivotTable 16
Wed 22 of Jul, 2015 09:34 GMT-0000 Xavier de Pedro qdap desc 15
Wed 22 of Jul, 2015 08:56 GMT-0000 Xavier de Pedro stringr added 14
Wed 22 of Jul, 2015 08:55 GMT-0000 Xavier de Pedro adding info of r package to get counts from the data frame so that graphs of frequencies can be produced with sjp.frq 13
Tue 21 of Jul, 2015 15:05 GMT-0000 Xavier de Pedro updated code - work in progress 12
Tue 21 of Jul, 2015 14:52 GMT-0000 Xavier de Pedro cleaning up and updating info about how to use (in this alpha stage) 11
Tue 21 of Jul, 2015 14:44 GMT-0000 Xavier de Pedro cleaning up 10
Tue 21 of Jul, 2015 14:42 GMT-0000 Xavier de Pedro re-organize page 9
Tue 21 of Jul, 2015 14:39 GMT-0000 Xavier de Pedro improved example with a working procedure to fetch the tracker data to an r object without using a custom wiki smarty template 8
Tue 21 of Jul, 2015 12:02 GMT-0000 Xavier de Pedro added link to bug report 7
Tue 21 of Jul, 2015 12:00 GMT-0000 Xavier de Pedro added a few commands from sjPlot 6
Tue 21 of Jul, 2015 11:58 GMT-0000 Xavier de Pedro translated 5
Tue 21 of Jul, 2015 10:33 GMT-0000 Xavier de Pedro tweaked 4
Fri 12 of Jun, 2015 22:48 GMT-0000 Xavier de Pedro added note about sjPlot 3
Fri 12 of Jun, 2015 07:11 GMT-0000 Xavier de Pedro added tip about ajax services 2
Mon 08 of Jun, 2015 21:47 GMT-0000 Xavier de Pedro ini, from geoff 1