-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
64 lines (43 loc) · 1.44 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
[English](README.md) | [日本語](README_JP.md)
# seq.geometric
<!-- badges: start -->
<!-- badges: end -->
`{seq.geometric}` is function to generate a sequence of equal ratios, also known as a geometric sequence.
## Installation
You can install of `{seq.geometric}` from Github with:
``` r
install.packages("remotes")
remotes::install_github("indenkun/seq.geometric")
```
## Example
```{r example}
library(seq.geometric)
```
By specifying the first term in `from`, the last term or the closest value to the last term in `to`, and the common ratio in `by.rate`, you can obtain an geometric sequence of "first term * common ratio ^ n" from "from" to the closest value to "to".
```{r}
seq_geometric(from = 1, to = 128, by.ratio = 2)
```
Returns an error if the geometric sequence does not converge with the specified argument.
```{r, error = TRUE}
seq_geometric(from = 1, to = 100, by.ratio = 0.1)
```
You can also specify the length of the sequence you want as an argument to `lenght.out`.
```{r}
seq_geometric(from = 1, to = 128, by.ratio = 2, length.out = 3)
```
## License
MIT.
## Notice
The email address listed in the DESCRIPTION is a dummy. If you have any questions, please post them on ISSUE.