forked from Statnet-Summer-Project/ndtv-shiny
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRdtoShinyInput.R
50 lines (44 loc) · 1.35 KB
/
RdtoShinyInput.R
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# TODO: Add comment
#
# Author: kirk
###############################################################################
#################################
#library(tools)
#Rd <- parse_Rd("plot.network.Rd")
#argument.index <- which(sapply(Rd,function(x)attr(x,"Rd_tag"))=="\\arguments")
#Arg <- Rd[[argument.index]]
#l1 <- unlist(lapply(Arg,function(x)try(x[[1]],silent = T)))
#parse.fn1 <- function(x)paste0(sapply(x[[2]],unlist),collapse="")
#l2 <- lapply(Arg, function(x)tryCatch(parse.fn1(x),error=function(e)return()))
#l12 <- paste(l1,l2,sep=":")
#l12.final <- l12[!grepl(":NULL",l12)]
#l12.list <- strsplit(l12.final,":")
#save(l12.list, file="plotnetworkExp.RData")
#################################
#
##################################
#library(tools)
#Rd <- parse_Rd("ergm-terms.Rd")
#Rd2txt(Rd)
#sapply(Rd,function(x)attr(x,"Rd_tag"))
#
#grep("item",Rd)
#
#
#argument.index <- which(sapply(Rd,function(x)attr(x,"Rd_tag"))=="\\section")
#Arg <- Rd[[491]]
#
#Arg[]
#
#l1 <- unlist(lapply(Arg,function(x)try(x[[1]],silent = T)))
#parse.fn1 <- function(x)paste0(sapply(x[[2]],unlist),collapse="")
#l2 <- lapply(Arg, function(x)tryCatch(parse.fn1(x),error=function(e)return()))
#l12 <- paste(l1,l2,sep=":")
#l12.final <- l12[!grepl(":NULL",l12)]
#l12.list <- strsplit(l12.final,":")
#
#
#save(l12.list, file="plotnetworkExp.RData")
#
##################################
#