ex03
This commit is contained in:
42
ex03.Rmd
42
ex03.Rmd
@@ -3,6 +3,7 @@ title: "Location Based Services Assignment 03"
|
|||||||
author: "Erik Neller"
|
author: "Erik Neller"
|
||||||
date: "`r Sys.Date()`"
|
date: "`r Sys.Date()`"
|
||||||
output:
|
output:
|
||||||
|
pdf_document: default
|
||||||
html_document:
|
html_document:
|
||||||
df_print: paged
|
df_print: paged
|
||||||
---
|
---
|
||||||
@@ -11,35 +12,14 @@ output:
|
|||||||
knitr::opts_chunk$set(echo = TRUE)
|
knitr::opts_chunk$set(echo = TRUE)
|
||||||
```
|
```
|
||||||
# Task 1
|
# Task 1
|
||||||
|
```{r}
|
||||||
```{r plot}
|
library(stats)
|
||||||
|
mean <- 2
|
||||||
# Load required packages
|
variance <- 2
|
||||||
sy <- sunspots
|
alpha <- mean ^ 2 / variance
|
||||||
plot(sunspots, col='blue', xlab='time [year]', ylab='Sunspot number')
|
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
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user