Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
iguir2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pet-estatistica
iguir2
Merge requests
!8
Issue#8
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Issue#8
issue#8
into
master
Overview
0
Commits
2
Changes
Merged
Walmes Marques Zeviani
requested to merge
issue#8
into
master
9 years ago
Overview
0
Commits
2
Changes
-
Expand
Esse ramo traz:
aplicações em
rpanel
do iguir1;
aplicações em
gWidgets
do iguir1;
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
86253497
2 commits,
9 years ago
+
1886
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
Search (e.g. *.vue) (Ctrl+P)
gWidgets/density.R
0 → 100644
+
47
−
0
Options
##----------------------------------------------------------------------
## Definições da sessão.
require(gWidgetstcltk)
options(guiToolkit="tcltk")
## options(guiToolkit="RGtk2")
## Vetor de valores para o qual será feito o histograma.
x <- precip
##-------------------------------------------
## Função reativa. Sem argumentos!
density.reactive <- function(...){
dn <- density(x,
kernel=svalue(sk),
width=svalue(sw))
plot(dn, main=NA, xlab="Precipitação", ylab="Densidade")
if (svalue(rg)){
rug(x)
}
}
##-------------------------------------------
## Interface.
w <- gwindow("Densidade empírica")
tbl <- glayout(container=w)
kf <- eval(formals(density.default)$kernel) ## Funções kernel.
tbl[1, 1] <- "Escolha uma função kernel:"
tbl[2, 1, expand=TRUE] <- (
sk <- gcombobox(items=kf,
## selected="gaussian",
coerce.with="as.character",
container=tbl, handler=density.reactive))
dn <- density(x, kernel="gaussian")
dn$w <- (dn$bw*4)*c(0.5, 3, 1)
tbl[3, 1] <- "Largura de banda"
tbl[4, 1, expand=TRUE] <- (
sw <- gslider(from=dn$w[1], to=dn$w[2],
by=diff(dn$w[-3])/100, value=dn$w[3],
container=tbl, handler=density.reactive))
tbl[5, 1, expand=TRUE] <- (
rg <- gcheckbox("Colocar rug?",
container=tbl, handler=density.reactive))
##----------------------------------------------------------------------
Loading