{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Loading required package: daltoolbox\n", "\n", "Registered S3 method overwritten by 'quantmod':\n", " method from\n", " as.zoo.data.frame zoo \n", "\n", "\n", "Attaching package: ‘daltoolbox’\n", "\n", "\n", "The following object is masked from ‘package:base’:\n", "\n", " transform\n", "\n", "\n" ] } ], "source": [ "# DAL ToolBox\n", "# version 1.1.727\n", "\n", "source(\"https://raw.githubusercontent.com/cefet-rj-dal/daltoolbox/main/jupyter.R\")\n", "\n", "#loading DAL\n", "load_library(\"daltoolbox\") " ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Loading required package: ggplot2\n", "\n", "Loading required package: RColorBrewer\n", "\n" ] } ], "source": [ "load_library(\"ggplot2\")\n", "load_library(\"RColorBrewer\")\n", "\n", "#color palette\n", "colors <- brewer.pal(4, 'Set1')\n", "\n", "# setting the font size for all charts\n", "font <- theme(text = element_text(size=16))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Examples using data distribution\n", "The following examples use random variables so that different data distribution can be better viewed." ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
exponential | uniform | normal | |
---|---|---|---|
<dbl> | <dbl> | <dbl> | |
1 | 0.09155231 | 2.612075 | 5.085059 |
2 | 2.01816829 | 3.294267 | 4.457824 |
3 | 0.58176393 | 2.636868 | 4.982670 |
4 | 0.12511421 | 3.344929 | 6.220225 |
5 | 0.02524745 | 2.573040 | 5.234677 |
6 | 0.31813066 | 2.620384 | 3.070939 |