4000:6000 gives you 4000, 4001, ..., 6000. I suspect you want population= c(seq(4000, 6000, length=5), seq(3500, 4300, length=5), seq(3000, 3200, length=5))
Bob On 20 September 2017 at 17:07, Shivi Bhatia <shivipm...@gmail.com> wrote: > Hi Team, > > I using the syntax as: > > data.df<- data.frame( > city= c(rep(c("Delhi", "Bangalore","Chandigarh"),each=5)), > population= c(4000:6000,3500:4300,3000:3200) > ) > > But i am getting the error as arguments imply differing number of rows: 15, > 3003. > > Tried searching google but could not understand & find the solution. > > Thanks, Shivi > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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. -- Bob O'Hara NOTE NEW ADDRESS!!! Institutt for matematiske fag NTNU 7491 Trondheim Norway Mobile: +49 1515 888 5440 Journal of Negative Results - EEB: www.jnr-eeb.org ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.