---
title: "Linear data"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{Linear data}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
```

```{r setup}
library(cardinalR)
library(langevitour)
```

```{r}
plane_2d_data <- plane(n = 300, coef_x1 = 1, coef_x2 = 1, coef_y1 = -1, coef_y2 = 1, intercept_x = -10, intercept_y = 8, 
u_min = 10, u_max = 30, v_min = 10, v_max = 20, num_noise = 2, 
min_n = 0, max_n = 1)

colnames(plane_2d_data) <- paste0("x", 1:NCOL(plane_2d_data))

langevitour(plane_2d_data, pointSize = 2)
```

```{r}
long_clust_data <- two_long_clust(n = 200, 
                                     num_noise = 2, min_n = -0.05, 
                                     max_n = 0.05)

colnames(long_clust_data) <- paste0("x", 1:NCOL(long_clust_data))

langevitour(long_clust_data, pointSize = 2)
```

```{r}
three_lin_data <- three_diff_linear(n = 300, 
                                               num_noise = 2, 
                                               min_n = -0.05, max_n = 0.05)

colnames(three_lin_data) <- paste0("x", 1:NCOL(three_lin_data))

langevitour(three_lin_data, pointSize = 2)
```

```{r}
four_lin_data <- four_long_clust(n = 500, 
                                                    num_noise = 2, 
                                                    min_n = -0.05, max_n = 0.05)

colnames(four_lin_data) <- paste0("x", 1:NCOL(four_lin_data))

langevitour(four_lin_data, pointSize = 2)
```

```{r}
plane_2dh_data <- plane_2d_hole(n = 600, num_noise = 2, 
                                     min_n = 0, max_n = 1)
plane_2dh_data$n

colnames(plane_2dh_data$df) <- paste0("x", 1:NCOL(plane_2dh_data$df))

langevitour(plane_2dh_data$df, pointSize = 2)
```

```{r}
four_linbkg_data <- four_long_clust_bkg(n = 165, 
                                                      num_noise = 2, 
                                                      min_n = -0.05, 
                                                      max_n = 0.05)

colnames(four_linbkg_data) <- paste0("x", 1:NCOL(four_linbkg_data))

langevitour(four_linbkg_data, pointSize = 2)
```

```{r}
three_linn_data <- three_long_clust(n = 300, 
                                           num_noise = 2, 
                                           min_n = -0.05, max_n = 0.05)

colnames(three_linn_data) <- paste0("x", 1:NCOL(three_linn_data))

langevitour(three_linn_data, pointSize = 2)
```

```{r}
two_linn_data <- two_long_clust_diff(n = 216, 
                                           num_noise = 2, 
                                           min_n = -0.05, max_n = 0.05)

colnames(two_linn_data) <- paste0("x", 1:NCOL(two_linn_data))

langevitour(two_linn_data, pointSize = 2)
```
