{ "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.01.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: RColorBrewer\n", "\n", "Loading required package: ggplot2\n", "\n" ] } ], "source": [ "load_library(\"RColorBrewer\")\n", "#color palette\n", "colors <- brewer.pal(4, 'Set1')\n", "\n", "load_library(\"ggplot2\")\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.1598983 | 2.705539 | 5.179180 |
2 | 2.3712059 | 3.437170 | 4.297048 |
3 | 0.4120131 | 2.986926 | 5.324625 |
4 | 0.1527977 | 3.082660 | 4.794226 |
5 | 1.1249669 | 2.547858 | 4.577240 |
6 | 2.0349881 | 3.362697 | 4.941374 |