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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T21:46:10+00:00 2026-06-02T21:46:10+00:00

I got a big data table X (504×9) and a smaller data frame bzShare

  • 0

I got a big data table X (504×9) and a smaller data frame bzShare (323X4) both with the columns top.sector and sizeClass. Now i want to join a value from bzShare into X so that the dimensions of X are (504×10). An inner join selects only rows with matching keys in both x and y if I am right but I always get zero rows 🙁

> dim(X)
[1] 504   9
> names(X)
[1] "sizeClass" "top.sector"    "year" "period" "somevar"
[6] "sumTest"   "sumTestTotal"  "AN"   "share"                    
> names(bzShare)
[1] "top.sector" "sizeClass"  "bzShare"   
> join(X,bzShare,type="inner",by=c("top.sector","sizeClass"))
NULL data table

Why didn’t get this a (504×10) 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-06-02T21:46:15+00:00Added an answer on June 2, 2026 at 9:46 pm

    Just because two data.frames or matrices share same column names it doesn’t mean that they will join/merge nicely among other things because they may not have any common keys between them two, which would be a typical results in a inner-JOIN case like the one you are describing.

    Check also that your bzShare object is not empty, though it has valid columns names (i.e. I miss the result of dim(bzShare))

    Start with:

    count(X$top.sector %in% bzShare$top.sector)
    count(X$sizeClass %in% bzShare$sizeClass)
    

    and see if you get something in each set intersection.

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

Sidebar

Related Questions

I've got a table in which there are some columns with big text data.
I got a php code that prints a table using while loop: while ($data
So Ive got a pretty big array of data and need to sort them
I've got a table with Clob field (is there any other data types in
At the moment I've got a big Entity Data Model (.edmx) with a database
I was trying to insert some data into a table and I got the
I am experimenting with MySQL enum data type. I have a table 15 columns
We got big table with nearly 100+ millions rows. Can someone help how to
I got a big issue when trying to parse json data in xcode. I
I've got a big Windows legacy application composed by many executables interacting with a

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.