File tree Expand file tree Collapse file tree 2 files changed +2
-22
lines changed
Expand file tree Collapse file tree 2 files changed +2
-22
lines changed Original file line number Diff line number Diff line change 11{
2- "activeTab": 1
2+ "activeTab": 2
33}
Original file line number Diff line number Diff line change 1- # plumber and Excel
2-
31# * Plot out data from a random normal distribution
4- # * @param .mean The mean of the standard normal deviation
2+ # * @param .mean The mean of the standard normal distribution
53# * @get /plot
64# * @serializer png
75function (.mean ) {
86 mu <- as.numeric(.mean )
97 hist(rnorm(n = 1000 , mean = mu , sd = 1 ))
10- }
11-
12- # * Plot out data from the iris dataset
13- # * @param spec If provided, filter the data to only this species (e.g. 'setosa')
14- # * @get /irisplot
15- # * @serializer png
16- function (spec ){
17- myData <- iris
18- title <- " All Species"
19-
20- # Filter if the species was specified
21- if (! missing(spec )){
22- title <- paste0(" Only the '" , spec , " ' Species" )
23- myData <- subset(iris , Species == spec )
24- }
25-
26- plot(myData $ Sepal.Length , myData $ Petal.Length ,
27- main = title , xlab = " Sepal Length" , ylab = " Petal Length" )
288}
You can’t perform that action at this time.
0 commit comments