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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:21:13+00:00 2026-06-14T23:21:13+00:00

I have a data frame like this: Date Impacting_APP Impacted_APP 1/1/2012 PS PayRoll 1/2/2012

  • 0

I have a data frame like this:

Date Impacting_APP     Impacted_APP
1/1/2012    PS                PayRoll
1/2/2012    PS                Web
1/3/2012    PS                HR
1/10/2012    Trading           PS
2/1/2012    Trading           PS
3/1/2012    Trading           PS
5/1/2012    PS                Payroll
8/1/2012    PS                Payroll
8/1/2012    PS                Payroll

etc

I need to summarize this data frame like below:

 Impacted_APP     Impacting_APP  Count
    PayRoll          PS             4
    PS               Trading        3

can somebody start me with this? Any ideas I can how I can summarize this data set?

  • 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-14T23:21:14+00:00Added an answer on June 14, 2026 at 11:21 pm

    The as.data.frame.table function will take table-data objects and recast them into long format.

    with( dfrm, as.data.frame( table( Impacting_APP  , Impacted_APP) ) )
    
       Impacting_APP Impacted_APP Freq
    1             PS           HR    1
    2        Trading           HR    0
    3             PS      Payroll    3
    4        Trading      Payroll    0
    5             PS      PayRoll    1
    6        Trading      PayRoll    0
    7             PS           PS    0
    8        Trading           PS    3
    9             PS          Web    1
    10       Trading          Web    0
    

    Note: the failure to match your answer was due to two variants of the factor level “Payroll” and “payroll”. Changing the input data and the order of arguments to table produces:

      Impacted_APP Impacting_APP Freq
    1           HR            PS    1
    2      Payroll            PS    4
    3           PS            PS    0
    4          Web            PS    1
    5           HR       Trading    0
    6      Payroll       Trading    0
    7           PS       Trading    3
    8          Web       Trading    0
    

    After assigning to ‘counts.df’ this code would adress the desire in the comment for selective display of the results:

    counts.df <- with( dfrm, as.data.frame( table( Impacted_APP, Impacting_APP ) ) )
    subset(counts.df, Impacted_APP=="Payroll" & Freq>0)
    #----------------------------------#
      Impacted_APP Impacting_APP Freq
    2      Payroll            PS    4
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a data.frame that looks like this: ID Date.A Date.B Variable A 01/01/2012
I have a data frame like this: df Date Player Injured 1/2/2012 A No
I have a data frame like this Date Team Score 1/1/2010 A 10 1/1/2010
I have a data frame like this: Server Date Server Space 1 2010-01-30 server1
If I have data like this DF <- data.frame( date = seq(Sys.Date()-1000, len=1000, by=1
I have a data frame that looks like this: site date var dil 1
I have a data frame with gaps like this: Var1 Var2 Var3 1 NA
I have a data.frame that looks like this: > head(ff.df) .id pio caremgmt prev
I have a data.frame in R that looks like this: score rms template aln_id
I have a data frame in R that looks like this: > TimeOffset, Source,

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.