[R] Needing help for excluding vector elements

arun smartpink111 at yahoo.com
Fri Jul 12 16:10:46 CEST 2013


Hi,
Try:
set.seed(41)
vec1<- sample(1:50,12000,replace=TRUE)
tail(vec1,-1000)
length(tail(vec1,-1000))
#[1] 11000


A.K.




----- Original Message -----
From: Olivier Charansonney <olivier.charansonney at orange.fr>
To: r-help at r-project.org
Cc: 
Sent: Friday, July 12, 2013 6:06 AM
Subject: [R] Needing help for excluding vector elements

Hello,

R for Dummies.

How can I exclude the first 1000 values of a vector (length 12000)? More
generally all the values up to the ith?

Thanks for your help,



Dr Olivier Charansonney

Cardiologue

Centre Hospitalier Sud-Francilien, Corbeil-Essonnes, France




    [[alternative HTML version deleted]]

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list