Concerto v4.b web-based Content Management System for R Users
R-bloggers 2013-04-24
(This article was first published on Econometrics by Simulation, and kindly contributed to R-bloggers)
Concerto is a open source R Content Management System for developing online applications. The primary purpose of Concerto is for the designing of online tests. However, the hard working programmers at the University of Cambridge Psychometrics Centre have created a program that is flexible enough to address a wide range of applications such as the development of statistical learning tools, client management systems, as well as large scale survey deployment. Future plans for Concerto would include the integration of it and the Psychometric's Center's facebook App which has collected detailed information for millions of respondents spanning a number of fascinating surveys. The real beauty of Concerto is that it provides an interface that builds on the vast resources of R in order to seamlessly integrate a powerful environment capable of managing the enormous contributions of web developers. Well, enough advertising. Let's see how v4b works. In this post I will map out the logic of Concerto environment as I understand it now. I will flesh out more in future posts as I get a better grasp of the Concerto environment. For this post and all future posts I will look only at version 4b of Concerto or higher. For the test developer the base operating system is R. For now I will use pseudo R-like code. Pseudo code is useful at explaining coding concepts. First we start with an initialization of a “test”. Tests are made up of R code. # START – pseudo code random item survey # The first thing a test might do is have a user input demographic information. 1.> intro = Concerto.html.tempate(Introduction) # The responses from the Introduction page are returned as a list assigned to the Intro object. # This responses might include any kind of information like: age, name, gender, ect. We can target the values the same way as any list object. 2> print(intro$age) # Interestingly this command does not actually do anything as far as the user is concerned because the screen output from R is suppressed. However in debugging mode screen returns from R are displayed in the testing window. # We may write the information we have gathered so far to our user information table which is a sql table. Concerto R is able to send commands to sql. Remember this is only pseudo-code. 3> Concerto.sql.send(user_table, user_name=intro$user.name, user_age=intro$user.age) # Now let’s administer our test items. Let’s say we have all of our items in a table. 4> items = concerto.sql.get(items) # We can figure out how many we are by counting the rows. 5> nitems = nrows(items) # We want to select 20 items randomly so that almost nobody shares item sets. 6> item.choice = sample(1:nitems, 20) # Now to administer the items we simply send them to the user by looping through all of them. 7> response.vector = NULL 8> for (i in item.choice) response=c(response, Concerto.html.tempate(item.admin, params=list(text=items$text[i])) # Now we have two vectors. A vector of item responses and a vector of items administered. # All that is left is to save this response pattern 9> Concerto.sql.send(response_table, items=item.choice, responses=response.vector) # And provide the user with some feedback 10> feedback = feedback.analysis(item.choice, response.vector) # Now we simply display the results of this feeback analysis (this of course would be a function that we have already coded. 11> concerto.html.template(Feedback) # END – pseudo code random item survey In future posts I will strive to post functioning code and functioning tests. To learn more about Concerto check out the development website: https://code.google.com/p/concerto-platform/
To leave a comment for the author, please follow the link and comment on his blog: Econometrics by Simulation.
R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series,ecdf, trading) and more...