Skip to content

Function to generate a sequence of equal ratios, also known as a geometric sequence on R.

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

indenkun/seq.geometric

Repository files navigation

English | 日本語

seq.geometric

{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:

install.packages("remotes")
remotes::install_github("indenkun/seq.geometric")

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”.

seq_geometric(from = 1, to = 128, by.ratio = 2)
#> [1]   1   2   4   8  16  32  64 128

Returns an error if the geometric sequence does not converge with the specified argument.

seq_geometric(from = 1, to = 100, by.ratio = 0.1)
#> Error: The calculation results do not converge.

You can also specify the length of the sequence you want as an argument to lenght.out.

seq_geometric(from = 1, to = 128, by.ratio = 2, length.out = 3)
#> [1] 1 2 4

License

MIT.

Notice

The email address listed in the DESCRIPTION is a dummy. If you have any questions, please post them on ISSUE.

About

Function to generate a sequence of equal ratios, also known as a geometric sequence on R.

Topics

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages