-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerate.R
More file actions
26 lines (21 loc) · 826 Bytes
/
generate.R
File metadata and controls
26 lines (21 loc) · 826 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
generate <- function(data, id=NULL, ...) {
parsed <- parser(data, id)
index <- ""
for (i in 1:nrow(parsed)) {
data <- datacalc(parsed$date[i])
if (parsed$sent[i]==0){
index <- paste(index, tags$div(class="panel panel-default",tagList(
div(class="panel-heading", h6(parsed$who[i]), span(class="label label-default", "received")),
div(class="panel-body",p(parsed$text[i]), p(class="text-muted", data)),
)),
sep = " ")
}else{
index <- paste(index, tags$div(class="panel panel-default",tagList(
div(class="panel-heading", h6(parsed$who[i]), span(class="label label-primary", "sent")),
div(class="panel-body",p(parsed$text[i]), p(class="text-muted", data)),
)),
sep = " ")
}
}
index
}