title: "Introduction to the RANSAC Package"
author: "Jadson Abreu"
date: "r Sys.Date()
"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Introduction to the RANSAC Package}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
This package provides robust fitting methods for linear and nonlinear models using the RANSAC algorithm.
```r library(RANSAC)
set.seed(123) x <- 1:20 y <- 2*x + rnorm(20) y[c(18,19,20)] <- y[c(18,19,20)] + 30 # Add outliers dados <- data.frame(x = x, y = y)
modelo <- ransac_reg(y ~ x, data = dados, n_min = 2, tol = 5)
summary(modelo)
set.seed(456) x <- seq(1, 10, length.out = 20) y <- 2 * x^1.5 + rnorm(20) y[c(18,19,20)] <- y[c(18,19,20)] + 50 dados <- data.frame(x = x, y = y)
modelo <- ransac_nls(y ~ a * x^b, data = dados, start = list(a = 1, b = 1.5), n_min = 3, tol = 10)
summary(modelo)
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.