hoď ma hore
Milí diskutujúci. Pri diskutovaní prosím: 1. nepridávaj jednoslovné témy / 2. nepridávaj uražlivé alebo vulgárne komentáre. Ak tieto pravidlá nedodržíš, tvoja téma pravdepodobne skončí v koši. Príjemné diskutovanie :)
none
ak chceš diskutovať, musíš sa registrovať. registrácia

tu sa nachádzaš : 

hlavná stránka  /  počítače  /  téma

R Shiny

príspevkov
5
zobrazení
18
tému vytvoril(a) 25.4.2019 12:31 TheDude
posledná zmena 25.4.2019 12:56
1
25.04.2019, 12:31
library(shiny)

# Define UI for application that draws a histogram
shinyUI(fluidPage(

# Application title
titlePanel("Old Faithful Geyser Data"),

# Sidebar with a slider input for number of bins
sidebarLayout(
sidebarPanel(
numericInput("pocet", "vyber pocet R v tab", 10, min = 1, max = 100),
wellPanel(
selectInput("atribut","Vyberte atribut",choices =colnames(airquality)),
radioButtons("farba","Vyberte farbu grafu",choices=c("yellow","red","green")),
textInput("nadpis", "zadajte nadpis ", "nadpis"),
actionButton("goButton", "Go!")
)

),

# Show a plot of the generated distribution
mainPanel(
plotOutput("distPlot"),
tableOutput("table")
)
)
))


Server :
library(shiny)

# Define server logic required to draw a histogram
shinyServer(function(input, output) {

observeEvent(input$goButton, {
output$distPlot <- renderPlot({
boxplot(get(input$atribut)~Month, data = airquality, col = input$farba, main = input$nadpis)

})

output$table <- renderTable({
tail(airquality, input$pocet)
})
}, once=TRUE)
})
none
2
25.04.2019, 12:36
Skupina A :
ibrary(shiny)

# Define UI for application that draws a histogram
shinyUI(fluidPage(

# Application title
titlePanel("Data o mestach "),

# Sidebar with a slider input for number of bins
sidebarLayout(
sidebarPanel(
selectInput("atribut", "Vyberte atribut:",
choices = c(colnames(state.x77))),

radioButtons("farba", "vyber farbu:",
choices =c(red= "red" , blue= "blue" )),

numericInput("cislo", "vyber:", 12, min = 2, max = 20),
numericInput("rozdelenie", "vyber:", 12, min = 1, max = 50)
),

# Show a plot of the generated distribution
mainPanel(
plotOutput("distPlot"),
tableOutput("tables")
)
)
))

Server:

library(shiny)

# Define server logic required to draw a histogram
shinyServer(function(input, output) {

output$distPlot <- renderPlot({
x <- state.x77[,input$atribut]
bins <- seq(min(x), max(x), length.out = input$cislo +1)
hist(x, breaks = bins, col= input$farba)


})
output$tables <- renderTable({ head(iris, input$cislo)

})

})
none
3
25.04.2019, 12:39
C
server
library(shiny)

# Define server logic required to draw a histogram
shinyServer(function(input, output) {

output$textik <- renderText({
vypis=c("Vybrali ste si", input$radioID, "farbu a na porovnanie ste zadali atribúty ", input$selectID1, input$selectID2)
print(vypis)
})

output$distPlot <- renderPlot({

# generate bins based on input$bins from ui.R
# neviem ako zobrazit zaroven aj iny stlpec od selectID2
x <- quakes[, input$selectID1]
#bins <- seq(min(x), max(x), length.out = input$bins + 1)

# draw the histogram with the specified number of bins
hist(x, col =input$radioID, border = 'white', lwd=input$numericID)

})



})
library(shiny)

# Define UI for application that draws a histogram
shinyUI(fluidPage(

# Application title
titlePanel("Dáta Quakes"),

flowLayout(
selectInput("selectID1","Vyberte atribút č.1",choices=colnames(quakes)),
selectInput("selectID2","Vyberte atribút č.2", choices=colnames(quakes)),
radioButtons("radioID","Vyberte farbu grafu",choices=c("green","yellow","black")),
numericInput("numericID","Zadajte hrúbku bodov:",value=1, min=1, max=3)
),



# Show a plot of the generated distribution
mainPanel(
textOutput("textik"),
plotOutput("distPlot"),
tableOutput("tablee")
)
)
)
none
4
25.04.2019, 12:49
f=function(x){
5*sin(x)-exp(x)
}


curve(5*sin(x),-5,5)
curve(exp(x),add=TRUE, col="blue")

# vsetky sa nedaju najst.........

uniroot(f, lower=-4, upper=-2, tol=1e-4)
uniroot(f, lower=0, upper=1, tol=1e-4)
uniroot(f, lower=1, upper=2, tol=1e-4) # najvyssi koren




predaj=c(9,5,18,14,10,12,7,11,5,16,14,11)
cena=c(18,24,9,15,17,16,20,15,22,14,15,19)

tabulka=data.frame(predaj,cena)
ciara=lm(predaj~cena,data=tabulka)
plot(tabulka)
abline(ciara)
none
5
25.04.2019, 12:56
---
title: "Skupina A"
author: "Tomáš"
date: "22 apríla 2017"
output: html_document
---

#Štruktúra systému R
**R** systém je rozdelený do *dvoch* konceptuálnych častí.

<!-- nemam ten zoznam -->

********
##Relevantné simulačné nástroje
Názov | Výhody | Nevýhody | Open-source
------|--------|----------|------------
R |Podpora knižníc|Náročnejší|Áno
Matlab|Podpora matíc|Podpora štat. metód|Nie

###Dáta mtcars
Dáta mtcars obsahujú tieto názvy stĺpcov

```{r, echo=TRUE}
tab=mtcars
print(colnames(tab))

```


<!--Neviem dat dokopy histogramy-->
```{r pressure, echo=FALSE}
hist(tab$hp, col="blue", main="Nadpis grafu", xlab="hp")
hist(tab$wt, col="blue", main="Nadpis grafu", xlab ="wt")


---
title: "Skupina C"
author: "Tomáš"
date: "24 apríla 2017"
output: html_document
---
## Štruktúra systému R
**R** systém je rozdelný do *dvoch* konceptuálnych častí.

1. R "base" systém
+ CRAN(priestor pre zdielanie balíkov)
2. Všetko ostatné

### Kvadratická rovnica
Diskriminant vypočítame podľa vzorca $D=b^2{2}+4*a*c$

##Dáta a graf
Počet stĺpcov a riadkov dát airquality

```{r eval=FALSE }
nrow(airquality)
ncol(airquality)
```
```{r echo=FALSE }
boxplot(airquality$Ozone~airquality$Month, col="blue", xlab="xova os", ylab="ylonova os", main="GRAF")
```
none

najnovšie príspevky :

prevádzkuje diskusneforum.sk kontaktuj správcu diskusného fóra vytvoril dzI/O 2023 - 2026 verzia : 1.05 ( 27.4.2024 1:45 ) veľkosť : 90 099 B vygenerované za : 0.059 s unikátne zobrazenia tém : 1 900 120 unikátne zobrazenia blogov : 19 098 táto stránka musí používať koláčiky, aby mohla fungovať...

možnosti :

hlavná stránka nastavenia blogy todo

online účastníci :

hľadanie :

blog dňa :

Pope Francis is Jacob Rothschild, 4th Baron Rothschild's third cousin once removed's wife's first cousin four times removed's husband's great niece's husband's brother! Preložte to prosím niekto do slovenčiny, nie som si istý, či Deepl neklame. Mu...

citát dňa :

Musíš sa veľa učiť, aby si vedel, ako málo vieš.