Skip to content
Snippets Groups Projects
Commit 2f6e5dad authored by Eduardo E. R. Junior's avatar Eduardo E. R. Junior
Browse files

Corrige a escrita de variáveis e funçĩes no .GlobalEnv

Remove o global.R para que os objetos não sejam salvos na sessão do
usuário (http://shiny.rstudio.com/articles/scoping.html)
parent f6c8fa80
No related branches found
No related tags found
No related merge requests found
##-------------------------------------------
## global.R
library(xtable)
library(labestData)
data(keywords, package = "labestData")
keywords$obra <- gsub(
pattern = "^([A-Z]{1}[a-z]*)[A-Z]{1}[a-z]{1}.*$",
replacement = "\\1",
x = keywords$name)
howmanydigits <- function(x) {
x <- na.omit(x)
if (is.numeric(x) && all(x%%1 == 0)) {
0
} else if (is.numeric(x)) {
1 + floor(log10(1/min(diff(sort(unique(x))))))
} else {
0
}
}
static_help <- function(pkg, topic, out,
links = tools::findHTMLlinks()) {
pkgRdDB = tools:::fetchRdDB(file.path(
find.package(pkg), 'help', pkg))
force(links)
tools::Rd2HTML(pkgRdDB[[topic]], out, package = pkg,
Links = links, no_links = is.null(links))
}
##-------------------------------------------
## Variables and functions
library(xtable)
library(labestData)
## data(keywords, package = "labestData")
keywords$obra <- gsub(
pattern = "^([A-Z]{1}[a-z]*)[A-Z]{1}[a-z]{1}.*$",
replacement = "\\1",
x = keywords$name)
howmanydigits <- function(x) {
x <- na.omit(x)
if (is.numeric(x) && all(x%%1 == 0)) {
0
} else if (is.numeric(x)) {
1 + floor(log10(1/min(diff(sort(unique(x))))))
} else {
0
}
}
static_help <- function(pkg, topic, out,
links = tools::findHTMLlinks()) {
pkgRdDB = tools:::fetchRdDB(file.path(
find.package(pkg), 'help', pkg))
force(links)
tools::Rd2HTML(pkgRdDB[[topic]], out, package = pkg,
Links = links, no_links = is.null(links))
}
##-------------------------------------------
## server.R
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment