Commit 0f990eb5 authored by Jean-Marie Lepioufle's avatar Jean-Marie Lepioufle
Browse files

add readme

parent 73255f63
......@@ -14,6 +14,9 @@ Imports:
dplyr,
ggplot2,
grDevices
Suggests:
knitr
VignetteBuilder: knitr
License: GPL-3
Encoding: UTF-8
LazyData: false
......
......@@ -42,10 +42,6 @@ basicr <- function(dataset,target,group="none"){
#' }
basic_ <- function(dataset,target){
if (is.null(dataset) || (!inherits(dataset,"tbl_friendlyts")) ) {
stop("need non-null tbl_friendlyts dataset")
}
names(dataset)[names(dataset)==target] <- "targ"
res <- dataset %>% summarise(
......
# basicr
## Description
The package make easy basic statistics on tbl_friendlyts object.
- n, mean, standard-deviation, IQR, min, max,...
- On different groups: hour,wday, month
## Prerequisite
Install the "remotes" R-package
```R
source("https://raw.githubusercontent.com/r-lib/remotes/master/install-github.R")$value("r-lib/remotes")
```
## Installation
```R
library("remotes")
remotes::install_git("git@git.nilu.no:rdiagnosis/basicr.git")
```
---
title: "luft"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{luft}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r setup, include = FALSE}
library(friendlyr)
knitr::opts_chunk$set(collapse = T, comment = "#>")
```
## Comparison between a client and reference dataset.
```R
fromDate <- "2016/11/01 00:00:00"
toDate <- "2016/11/5 00:00:00"
timeResolution <- "hourly"
precision <- "hourly"
# get luftkvalitet data
luft <- friendlyr::ts(session_name="luftlyr",username="*****",password="*****",
fromDate=fromDate,toDate=toDate,precision=precision,timeResolution=timeResolution,
element_id=c("NO2"),location="oslo,norway")
plot(luft,target="NO2_7",DESKTOP=TRUE)
res <- basicr::basicr(dataset=luft,target="NO2_7",group="none")
res
res <- basicr::basicr(dataset=luft,target="NO2_7",group="HOUR")
res
res <- basicr::basicr(dataset=luft,target="NO2_7",group="WDAY")
res
res <- basicr::basicr(dataset=luft,target="NO2_7",group="MONTH")
res
```
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment