-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME_JP.Rmd
More file actions
64 lines (43 loc) · 1.43 KB
/
README_JP.Rmd
File metadata and controls
64 lines (43 loc) · 1.43 KB
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}`は等比数列を求めるための関数を提供するパッケージです。
## Installation
`{seq.geometric}`はGithubからインストールできます。
``` r
install.packages("remotes")
remotes::install_github("indenkun/seq.geometric")
```
## Example
```{r example}
library(seq.geometric)
```
`from`で初項を指定し、`to`で最終項か最終項に最も近い値を指定し、`by.rate`で公比を指定することで、"初項*公比^n"の等比数列を"from"から"to"に最も近い値まで求めることができます。
```{r}
seq_geometric(from = 1, to = 128, by.ratio = 2)
```
求める数列の解が収束しない場合はエラーが出ます。
```{r, error = TRUE}
seq_geometric(from = 1, to = 100, by.ratio = 0.1)
```
求める数列の長さを`length.out`で指定することもできます。
```{r}
seq_geometric(from = 1, to = 128, by.ratio = 2, length.out = 3)
```
## License
MIT.
## Notice
DESCRIPTIONに記載しているメールアドレスはダミーです。なにかあればISSUEに記載してください。