Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8760393
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T15:01:43+00:00 2026-06-13T15:01:43+00:00

I would like to bootstrap a large data set which contains multiple column and

  • 0

I would like to bootstrap a large data set which contains multiple column and row variables. The following is a simplified re-creation of my data set:

charDataDiff <- data.frame(c('A','B','C'), matrix(1:72, nrow=9))
colnames(charDataDiff) <- c("patchId","s380","s390","s400","s410","s420","s430","s440","s450")

Separate the data using the patchId as the criteria. This creates three lists: one for each Variable

idColor <-  c("A", "B", "C")
(patchSpectrum <- lapply(idColor, function(idColor) charDataDiff[charDataDiff$patchId==idColor,]))

Created the function sampleBoot to sample the patchSpectrum

sampleBoot <-  function(nbootstrap=2, patch=3){
    return(lapply(1:nbootstrap, function(i)
             {patchSpectrum[[patch]][sample(1:nrow(patchSpectrum[[patch]]),replace=TRUE),]}))}

Example:

sampleBoot(5,3)

Here is where I am stuck:

  1. I need to sample each patchId list along with each column variable (which the above “sampleBoot” easily accomplish),
  2. Take the median of each patchId sampling list iteration, and
  3. Create a new population of the medians to calculate parametric parameters. I can do it manually but that would be silly.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T15:01:44+00:00Added an answer on June 13, 2026 at 3:01 pm

    As much as I understand from your question, you may do as follows:

    do.call(rbind, lapply(sampleBoot(5, 3), function(x) apply(x[-1], 2, median)))
    

    It crates a table of the medians of 5 samplings of patch 3.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Bootstrap a large data set I would like to bootstrap a large
By using bootstrap I would like to display green and red labels which context
I am currently using twitter bootstrap, which is working nicely, but I would like
I would like to obtain the following effect using twitter bootstrap. One link for
I have a large scroll-able table I built with Twitter bootstrap but would like
I am using twitter bootstrap and I would like a container div to stretch
For a project of mine I would like to extend twitter bootstrap modal window
I'm using Bootstrap and Bootstrap Carousel in a project. I would like to know
I'm trying to use twitter bootstrap to create Facebook like tooltip layout. I would
Would like to be able to set colors of headings and such, different font

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.