{ "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: 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": [ "#### Synthetic time series" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
x | sin | cosine | |
---|---|---|---|
<dbl> | <dbl> | <dbl> | |
1 | 0.00 | 0.0000000 | 6.000000 |
2 | 0.25 | 0.2474040 | 5.968912 |
3 | 0.50 | 0.4794255 | 5.877583 |
4 | 0.75 | 0.6816388 | 5.731689 |
5 | 1.00 | 0.8414710 | 5.540302 |
6 | 1.25 | 0.9489846 | 5.315322 |