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 8621827
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:54:21+00:00 2026-06-12T06:54:21+00:00

I need some help with data analysis. I do have two datasets (before &

  • 0

I need some help with data analysis.
I do have two datasets (before & after) and I want to see how big the difference is between them.

Before

11330    STAT1
2721    STAT2
52438    STAT3
6124    SUZY

After

17401    STAT1
3462    STAT2
0    STAT3
72    SUZY

Tried to group them with tapply(before$V1, before$V2, FUN=mean).
But as I am trying to plot it, on x axis am not getting the group name but number instead.
How can I plot such tapplied data (frequency on Y axis & group name on X axis)?

Also wanted to ask what is the proper command in R to compare such datasets as I am willing to find the difference between them?


Edited

dput(before$V1)
c(11330L, 2721L, 52438L, 6124L)

dput(before$V2)
structure(1:4, .Label = c(“STAT1”, “STAT2”, “STAT3″,”SUZY”),class = “factor”)

  • 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-12T06:54:22+00:00Added an answer on June 12, 2026 at 6:54 am

    Here are a couple of ideas.

    This is what I think your data look like?

    before <- data.frame(val=c(11330,2721,52438,6124),
                         lab=c("STAT1","STAT2","STAT3","SUZY"))
    after <- data.frame(val=c(17401,3462,0,72),
                         lab=c("STAT1","STAT2","STAT3","SUZY"))
    

    Combine them into a single data frame with a period variable:

    combined <- rbind(data.frame(before,period="before"),
          data.frame(after,period="after"))
    

    Reformat to a matrix and plot with (base R) dotchart:

    library(reshape2)
    m <- acast(combined,lab~period,value.var="val")
    dotchart(m)
    

    Plot with ggplot:

    library(ggplot2)
    qplot(lab,val,colour=period,data=combined)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need some help with union two cell arrays. I have: data{1} = 'alon'
I need some help with a MySQL query I'm working on. I have data
I have a 5 byte data element and I need some help in figuring
I need some help to build SQL Query. I have table having data like:
I need some help to build SQL Query. I have table having data like:
Need some help with putting this query together. I'm using Mysql I have two
I need some help to store some data efficiently. I have a large list
I need some help with text manipulation. I do have data like this: 29554
I need some help to build SQL Query. I have table having data like:
i need some help with nsarrays and uipicker i have a table of data

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.