Can you specify you're task? I don't understand totally what you need to
do? You're already getting odd numbers with : seq(1,100,by=2)
-
- László-András Zsurzsa,-
(1,100,by=2)])
#[1] TRUE
Hope it helps.
A.K.
From: Zsurzsa Laszlo zsurzsalas...@gmail.com
To: arun smartpink...@yahoo.com
Cc: R help r-help@r-project.org
Sent: Wednesday, August 28, 2013 5:21 AM
Subject: Re: [R] R Language Newbie
Can you specify you're task
Sent: Wednesday, August 28, 2013 8:58 AM
Subject: Re: [R] R Language Newbie
Hello,
#3
myVector - c(1:100)
oddVector - myVector[c(1:100) %% 2 == 1]
odd - myVector[c(1:100) %% 2 == 1]
identical( odd, seq(1,100,by=2)) gives me FALSE
help r-help@r-project.org
Sent: Wednesday, August 28, 2013 5:21 AM
Subject: Re: [R] R Language Newbie
Can you specify you're task? I don't understand totally what you need to do?
You're already getting odd numbers with : seq(1,100,by=2
Subject: Re: [R] R Language Newbie
Hello,
#3
myVector - c(1:100)
oddVector - myVector[c(1:100) %% 2 == 1]
odd - myVector[c(1:100) %% 2 == 1]
identical( odd, seq(1,100,by=2)) gives me FALSE
Hi,
set.seed(29)
myVector- rnorm(100)
seq(1,100,by=2)
# [1] 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49
#[26] 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99
myVector[seq(1,100,by=2)]
rev(myVector)
sum(myVector0)
#[1] 46
#or
6 matches
Mail list logo