{ "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", "Loading required package: ggplot2\n", "\n", "Loading required package: dplyr\n", "\n", "\n", "Attaching package: ‘dplyr’\n", "\n", "\n", "The following objects are masked from ‘package:stats’:\n", "\n", " filter, lag\n", "\n", "\n", "The following objects are masked from ‘package:base’:\n", "\n", " intersect, setdiff, setequal, union\n", "\n", "\n" ] } ], "source": [ "# DAL ToolBox\n", "# version 1.0.777\n", "\n", "source(\"https://raw.githubusercontent.com/cefet-rj-dal/daltoolbox/main/jupyter.R\")\n", "\n", "#loading DAL\n", "load_library(\"daltoolbox\") \n", "\n", "#for ploting\n", "load_library(\"ggplot2\")\n", "load_library(\"dplyr\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Maximum curvature\n", "If the curve is decreasing, use maximum curvature analysis. \n", "It brings a trade-off between having lower x values (with not so low y values) and having higher x values (not having to much decrease in y values). " ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
x | y | yfit | |
---|---|---|---|
<int> | <dbl> | <dbl> | |
1 | 9 | -1.609438 | 9.224359e-08 |