First you should read some introductory manuals on R. There are many to choose from at
http://cran.r-project.org/other-docs.html For example, your first question is very simple: z <- data.frame(a, b, c) To draw a single random sample (with replacement) from z: z1 <- z[sample(1:nrow(z), nrow(z), replace=TRUE),] ------------------------------------- David L Carlson Associate Professor of Anthropology Texas A&M University College Station, TX 77840-4352 -----Original Message----- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Michael Weylandt Sent: Thursday, April 25, 2013 4:36 AM To: Preetam Pal Cc: r-help@r-project.org Subject: Re: [R] Bootstrapping in R On Apr 25, 2013, at 7:02, Preetam Pal <lordpree...@gmail.com> wrote: > Hi all, > > 1>i have 3 vectors a,b and c, each of length 25....... i want to > 1>define a > new data frame z such that z[1] = (a[1] b[1] c[1]), z[2] = (a[2] b[2] > c[2]) and so on...how do i do it in R > z <- data.frame(a, b, c) > > 2> Then i want to draw bootstrap samples from z. Look at the boot package. MW > > Kindly suggest how i can do this in R. > > Thanks, > Preetam > -- > Preetam Pal > (+91)-9432212774 > M-Stat 2nd Year, Room No. N-114 > Statistics Division, C.V.Raman > Hall > Indian Statistical Institute, B.H.O.S. > Kolkata. > > [[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. ______________________________________________ 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.