[R] Can we prepare a questionaire in R

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Thu Jun 9 17:34:47 CEST 2011


On Thu, Jun 9, 2011 at 11:09 AM, amrita gs <ammasamritha at gmail.com> wrote:
> I will explain more clearly....
>
> I have an online feedback form which has all the form elements like
> radiobuttons,checkboxes,textareas,textboxes etc. I have to get the values of
> these form elements and use it for data analysis in R. It will be huge
> amount of data.
>
> 1) Is it possible in R to retrieve the values of these form elements
> directly.
>
> 2) Is there any storage mechanism in R to store the values.
> 2) Do i have to store the data in some files or db and then import them in
> R and use for data analysis. Is this better?????

 Are you analysing individual forms independently and giving rapid
feedback? For example, a user puts some numbers in a box, clicks
'fit', and expects to see some parameters back and maybe a plot? Then
you need R integrated with the server.

 Or are you doing summaries of many form submissions perhaps weekly or
at the end of the study period?

 There's a problem with using R to store values coming from a web form
- concurrency. Suppose two people submit the form at more or less the
same time. If your web server back-end is using R to save the data you
need to make sure the two processes aren't trying to write to the same
file at the same time or you'll corrupt it. Databases such as Postgres
sort this out by having clever locking mechanisms.

 If you are doing 'batch' analysis like this then you don't need R
involved with the server at all, and things are much simpler. Just use
a web server back end that suits you (java servlet, PHP, python web
application framework) that takes the form data and adds it to a data
base such as Postgres or MySQL.

 Then to do the analysis, R can get the data from such DBs and you can
figure out how to produce your pie charts easily...

 You say you are a beginner in R, so best to leave it and use
something else for the web side of things. What aren't you a beginner
in?

Barry



More information about the R-help mailing list