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

  • SEARCH
  • Home
  • 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 6467821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T05:49:55+00:00 2026-05-25T05:49:55+00:00

(Unfortunately, I am missing basic vocabulary to formulate my question. So, please correct me

  • 0

(Unfortunately, I am missing basic vocabulary to formulate my question. So, please correct me where more precise terms are useful.)

I use R to do very basic statistical analysis for benchmark results of virtual machines, and I often want to normalize my data based on some criterion.

Currently my problem is that I would like something like the following to work:

normalized_data <- ddply(bench, ~ Benchmark + Configuration + Approach,
                         transform,
                         Ratio = Time / Time[Approach == "appr2"])

So, what I actually want is to calculate the speed-up between corresponding pairs of measurements.

bench is a data frame with the columns Time, Benchmark, Configuration and Approach and contains 100 measurements for all possible combinations of Benchmark, Configuration and Approach.
Now I got exactly two approaches and want the speed-up of “appr2″/”appr1”.
Thus, just looking at one specific benchmark, and one specific configuration, I have 100 measurements for “appr1” and 100 of “appr2” in my data frame. However, R gives me the following error resulting from the give query:

Error in data.frame(list(Time = c(405.73, 342.616, 404.484, 328.742, 403.384,  : 
  arguments imply differing number of rows: 100, 0

Ideally, the result of my query would result in a new data frame with the three columns SpeedUp, Benchmark, Configuration. Based on that I would then be able to calculate means, confidence intervals and so on.

But at the moment, the basic problem is how to express such a normalization. For another data set I was able to calculate a normalized value like this Time.norm = Time / Time[NumCores == min(NumCores)] but looks like that worked just by chance, at least I do not understand the difference.

Any hints are appreciate. (Especially the right terminology to search for solutions for such problems.)

Edit: Thanks to Chase’s hint, here a minimal data set, which should be structurally identical to what I got, and it exhibits the same behavior with respect to the query above.

bench <- structure(list(Time = c(399.04, 388.069, 401.072, 361.646),
           Benchmark = structure(c(1L, 1L, 1L, 1L), .Label = c("Fibonacci"), class = "factor"), 
           Configuration = structure(c(1L, 1L, 1L, 1L), .Label = c("native"), class = "factor"),
           Approach = structure(c(1L, 1L, 2L, 2L), .Label = c("appr1", "appr2"), class = "factor")),
      .Names = c("Time", "Benchmark", "Configuration", "Approach"),
      row.names = c(NA, 4L), class = "data.frame")
  • 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-05-25T05:49:56+00:00Added an answer on May 25, 2026 at 5:49 am

    Looks like I still miss quite a number of basic concepts in R.

    The solution lies in the used formula: ~ Benchmark + Configuration + Approach groups the data according to all three dimensions, and that is not what I actually need. The resulting data set did really just contain data of “appr1”, and there was noting left to correlate to.

    So, changing the forumla to ~ Benchmark + Configuration results in a data set that contains “appr1” and “appr2” data for all Time measurements. And then, it works as intended 🙂

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

Sidebar

Related Questions

I created a very basic iPad application using the Window-based Application template. Unfortunately, the
This seems like a pretty basic question but I unfortunately don't know the answer
Unfortunately, my question is not as simple as keeping track of two windows created
Unfortunately it looks like for various reasons I'm going to have to use Visual
Unfortunately, the problem is not more specific than that. I've found a few examples
Unfortunately I have to use Windows Server 2003 on my 32 bit workstation due
I'm trying to use HtmlUnit to test that my GWT website loads properly. Unfortunately,
I still have to use the VB6 IDE. Unfortunately every time I start the
Some of my co-workers make extensive use of the VB.net concept of Modules. Unfortunately,
I want to use joda to parse datetime strings in emails. Unfortunately I get

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.