Top "Seq" questions

seq is short for sequence.

How do I generate a list with a specified increment step?

How do I generate a vector with a specified increment step (e.g. 2)? For example, how do I produce the …

r seq
Difference between a Seq and a List in Scala

I've seen in many examples that sometimes a Seq is being used, while other times is the List... Is there …

list scala collections seq
Create sequence of repeated values, in sequence?

I need a sequence of repeated numbers, i.e. 1 1 ... 1 2 2 ... 2 3 3 ... 3 etc. The way I implemented this was: nyear <- 20 names &…

r repeat seq replicate
Variables in bash seq replacement ({1..10})

Is it possible to do something like this: start=1 end=10 echo {$start..$end} # Ouput: {1..10} # Expected: 1 2 3 ... 10 (echo {1..10})

bash seq
Adding an item to an immutable Seq

Say, I have a sequence of strings as an input and I want to get a new immutable Seq which …

list scala seq
What are examples of when seq_along works, but seq produces unintended results?

What are good examples of when seq_along will work, but seq will produce unintended results? From the documentation of ?…

r seq
Convert Java List to Scala Seq

I need to implement a method that returns a Scala Seq, in Java. But I encounter this error: java.util.…

java scala seq scala-java-interop
Scala - What is the difference between size and length of a Seq?

What is the difference between size and length of a Seq? When to use one and when the other? scala&…

scala scala-2.10 seq
Generate a sequence of characters from 'A'-'Z'

I can make a sequence of numbers like this: s = seq(from=1, to=10, by=1) How do I make a sequence …

r character ascii sequence seq
Select every other element from a vector

Let's say I had a vector: remove <- c(17, 18, 19, 20, 24, 25, 30, 31, 44, 45). How do I select / extract every second value in the …

r vector seq