seq is short for sequence. A sequence is an ordered list of objects (or events). Like a set, it contains members (also called elements or terms), and the number of terms (possibly infinite) is called the length of the sequence. Unlike a set, order matters, and exactly the same elements can appear multiple times at different positions in the sequence. Sometimes, sequence is used as a generic name for both list, array and set for convenience.
Questions tagged [seq]
730 questions
-2
votes
2 answers
Explain seq example seq(stats::rnorm(20))
In the R manual there is one example of seq as follows:
seq(stats::rnorm(20))
Can someone explain to me what it is doing and is supposed to generate?

student
- 289
- 2
- 14
-2
votes
3 answers
How to create an increasing matrix?
Well, I have searched a lot of questions but nothing works. Here is my question, I was asked to create a matrix like this
# [,1] [,2] [,3] [,4] [,5]
# [1,] 1 2 3 4 5
# [2,] 2 3 4 5 6
# [3,] 3 4 5 6 …

Liu Oreo
- 29
- 2
-2
votes
1 answer
F#: how to calculate a subset using filtering predicate?
E.g.
For integer numbers between 1 and 10, select 3 numbers that:
1. Sum of these 3 numbers equals to 24
2. These 3 numbers could build a right triangle.
How to use F# to get these 3 numbers?
I know for Haskell this is very simple:
Prelude> let…

vik santata
- 2,989
- 8
- 30
- 52
-2
votes
1 answer
Assign times to 10 minute interval group in r
I am attempting to "cut" my data frame according Times (by 10 min).
dat <- read.table(text="Time
4:30:08 AM
3:37:00 PM
5:15:38 PM
5:16:41 PM
5:17:05 PM
5:17:25 PM
5:48:48 PM", header=TRUE, sep="\t")
I want it be like this:
Time Group
4:30:08…

AsSAASA
- 35
- 8
-2
votes
1 answer
Selecting column sequences and creating variables
I was wondering if there was a way to select specific columns via a sequence and create new variables from this.
So for example, if I had 8 columns with n observations, how could I create 4 variables that selects 2 rows sequentially? My dataset is…

James White
- 705
- 2
- 7
- 20
-2
votes
1 answer
How JOIN Seq with Array in Clojure?
I would try to perform a SQL JOIN like on results from MongoDB.
I have data to show on grid:
seqgroup: ({:_id #, :group_name gr1, :usersingroup_id [# #

marek
- 57
- 2
- 12
-3
votes
2 answers
Sort one Seq according to other Seq's value in Scala
How can I sort Scala Seq according to the order of values present in another Seq?
val original_seq = Seq("a", "b", "c", "d", "e", "f", "g") //[a,b,c,d,e,f,g]
val original_set = original_seq.toSet
val entity_set = Seq("a", "b", "d", "f").toSet …

vishalraj
- 105
- 2
- 11
-3
votes
1 answer
How can I iterate through a 2D Seq in scala using the foreach function?
I've been trying to iterate through a 2d Seq using foreach but I haven't been successful even though I googled a lot, I couldn't find anything about it(at least in scala). Thank you for the help.

Mehmet Berk Cetin
- 101
- 8
-6
votes
1 answer
Getting unique values in R
I have a sequence data and I importing it in the data frame. I want to have each distinct letters from the entire data frame and not from the each row.
The data frame looks like this:
Thanks for your help.

Krishnang Dalal
- 83
- 1
- 1
- 9
-7
votes
3 answers
How to create the vector 2:10 and 10:2 using the seq function
I need to use seq() to create the vector (2,3,4,5,6,7,8,9,10,9,8,7,6,5,4,3,2), but I'm stuck. I've done quite a bit of YouTube-ing and reading online, but can't find a specific enough solution.
Any help is appreciated, but please use the seq…

sashi
- 3
- 1