diff --git a/ex03.Rmd b/ex03.Rmd index d6092b6..aebbb66 100644 --- a/ex03.Rmd +++ b/ex03.Rmd @@ -3,6 +3,7 @@ title: "Location Based Services Assignment 03" author: "Erik Neller" date: "`r Sys.Date()`" output: + pdf_document: default html_document: df_print: paged --- @@ -11,35 +12,14 @@ output: knitr::opts_chunk$set(echo = TRUE) ``` # Task 1 - -```{r plot} - -# Load required packages -sy <- sunspots -plot(sunspots, col='blue', xlab='time [year]', ylab='Sunspot number') +```{r} +library(stats) +mean <- 2 +variance <- 2 +alpha <- mean ^ 2 / variance +beta <- variance / mean +shp <- alpha +scale <- beta +v <- rgamma(n=100, shape = shp, scale = scale) +plot(density(v)) ``` - -```{r summary} -print(summary(sunspots)) -print(sd(sunspots)) -``` -```{r whisker} -boxplot(sunspots, main='Boxplot diagram', xlab='Sunspot number', ylab='quartiles') -``` -```{r hist} -hist(sunspots, xlab= 'Sunspot number', ylab= 'number of occurrences', main='Sunspot number histogram') -``` -```{r density} -plot(density(sunspots), xlab= 'Sunspot number', ylab= 'probability of occurrence', main='Experimental PDF') -``` -# Task 2 -```{r exploratory} -library(leaflet) -library(sf) -library(DataExplorer) -library(lubridate) -pnt_data <- read.csv('rec.csv', header=FALSE, sep='',skip=15) -doy <- yday -``` - -