Re: [R] how to get a numeric vector?

2020-10-05 Thread Martin Maechler
> Avi Gross via R-help > on Sun, 4 Oct 2020 19:50:43 -0400 writes: > Always hard to tell if THIS is a homework project. As with > most things in R, if you can not find at least a dozen > ways to do it, it is not worth doing. > The question (way below) was how to take

Re: [R] how to get a numeric vector?

2020-10-05 Thread Mohammad Tanvir Ahamed via R-help
Hi,  You can try this.  Example: 1 a <- c(1, 4) b <- c(5, 8) unlist(as.vector(mapply(seq,a,b))) > [1]  1 2 3 4 5 4 5 6 7 8 a <- c(1, 4, 2) b <- c(5, 8, 10) unlist(as.vector(mapply(seq,a,b))) >  [1]  1  2  3  4  5  4  5  6  7  8  2  3  4  5  6  7  8  9 10 Regards. Tanvir Ahamed

Re: [R] how to get a numeric vector?

2020-10-05 Thread Avi Gross via R-help
vos via R-help Sent: Sunday, October 4, 2020 6:47 PM To: r-help Subject: [R] how to get a numeric vector? Hi, a <- c(1, 4) b <- c(5, 8) a:b [1] 1 2 3 4 5 Warning messages: 1: In a:b : numerical expression has 2 elements: only the first used 2: In a:b : numerical expression has 2 elements:

Re: [R] how to get a numeric vector?

2020-10-04 Thread John Fox
Dear vod vos, On 2020-10-04 6:47 p.m., vod vos via R-help wrote: Hi, a <- c(1, 4) b <- c(5, 8) a:b [1] 1 2 3 4 5 Warning messages: 1: In a:b : numerical expression has 2 elements: only the first used 2: In a:b : numerical expression has 2 elements: only the first used how to get: c(1:5,

[R] how to get a numeric vector?

2020-10-04 Thread vod vos via R-help
Hi, a <- c(1, 4) b <- c(5, 8) a:b [1] 1 2 3 4 5 Warning messages: 1: In a:b : numerical expression has 2 elements: only the first used 2: In a:b : numerical expression has 2 elements: only the first used how to get: c(1:5, 4:8) Thanks. __