Nothing
#' @export
#'
searchWord.tstTree <-
function(tree, string){
result <- 0
node <- 1
i <- 1
while (!is.na(node)) {
if (str_sub(string,i,i) < tree$ch[node]) {
node <- tree$L[node]
}
else if (str_sub(string,i,i) > tree$ch[node]) {
node <- tree$R[node]
}
else{
i <- i + 1
if (i - 1 == nchar(string)) {
result <- tree$flag[node]
}
else{
node <- tree$C[node]
}
}
}
as.logical(result)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.