5  After coding is done

Here we will discuss what you should do after you think you have done your coding part and made sure everything works properly. You will need to share your experiment with participants or testers and manage the spread links. After you gather the data you will need to analyze it.

5.1 Making sure everything works

To make sure that your code performs as intended regularly preview your experiment in the area at the bottom of your screen. Press “refresh” to watch the code performance within this part of the screen or “Open in new tab” to better understand how it looks like for your participants. Error messages and warnings appear at the top right corner of the screen. In order to hide this error window type DebugOff() in your code.

5.2 Sharing the experiment

You can share your experiment in two ways: you share it with your colleagues or testers who will leave a comment on your experiment and will not be included in your study sample and you may share it with your target participants.

If you want to test your experiment with somebody else before declaring its final version, you find the “Share” button in the “Actions” area. Then you copy the “Demonstration link” and share it.

If you want to send the experimental link directly to the target participants you need to find the “Actions” area and toggle the first tumbler to make your experiment “published”. Then you go to the “Share” button and copy the “Data-collection link” and share it.

If you want to cease gathering data from participants you untoggle the tumbler in this area. Participants will lose the ability to pass the experiment until you toggle it back

5.3 Analyze the results

To download the results you should on the ‘Results’ button in the right-hand menu, click the “more options” (three dots on the right). Select the desired tab with the results of the demo or data-collection link. Click “Download” button and you will download funny-looking .csv file with results collected with the chosen link.

The given .csv is difficult to analyze by itself but the project team provide a technical decision how to transform in into the better looking format in the R language. You can perform this function below in your .R code to read the data in a nice way. After this you can manipulate and analyze the data in an easier manner.

read.pcibex <- function(filepath, auto.colnames=TRUE, fun.col=function(col,cols){cols[cols==col]<-paste(col,"Ibex",sep=".");return(cols)}) {
  n.cols <- max(count.fields(filepath,sep=",",quote=NULL),na.rm=TRUE)
  if (auto.colnames){
    cols <- c()
    con <- file(filepath, "r")
    while ( TRUE ) {
      line <- readLines(con, n = 1, warn=FALSE)
      if ( length(line) == 0) {
        break
      }
      m <- regmatches(line,regexec("^# (\\d+)\\. (.+)\\.$",line))[[1]]
      if (length(m) == 3) {
        index <- as.numeric(m[2])
        value <- m[3]
        if (is.function(fun.col)){
         cols <- fun.col(value,cols)
        }
        cols[index] <- value
        if (index == n.cols){
          break
        }
      }
    }
    close(con)
    return(read.csv(filepath, comment.char="#", header=FALSE, col.names=cols))
  }
  else{
    return(read.csv(filepath, comment.char="#", header=FALSE, col.names=seq(1:n.cols)))
  }
}