1

I would like to read the source code for the base::sequence() function.

In R Studio, I can press F2, and usually read the code, though this time the cryptic response is:

function (nvec, ...) 
UseMethod("sequence")

I search the Read-only mirror of R source code at:

https://github.com/wch/r-source/search?q=sequence

And could not find the code there.

2

1 Answer 1

2
sequence.default
function (nvec, from = 1L, by = 1L, ...) 
{
    .Internal(sequence(as.integer(nvec), as.integer(from), as.integer(by)))
}
<bytecode: 0x7ff50ed324b0>
<environment: namespace:base>

Then, the sequence function is internal and you can find the source code here: https://github.com/wch/r-source/blob/0a05488b8d2455983ac290a1804af0bf427d6475/src/main/seq.c#L1115

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.