Hello,

Just count:
  city is 3*5 == 15,
  population is length(4000:6000) + length(3500:4300) + length(3000:3200)
                == 2001 + 801 + 201 == 3003
Hope this helps,

Rui Barradas



Citando Shivi Bhatia <shivipm...@gmail.com>:

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.

______________________________________________
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.

Reply via email to