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.charanson...@orange.fr> To: r-help@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@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. ______________________________________________ R-help@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.