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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T21:34:50+00:00 2026-06-01T21:34:50+00:00

I recently got started with R . I would like to carry out a

  • 0

I recently got started with R. I would like to carry out a log-linear analysis of a 2x2x2 table. All i have are the categories and frequencies. How do I get this data into R?

I know that the function table() can make contingency tables out of data, the thing is, I already have the contingency table. The question now is how to correctly represent it in R.

So far, I have the following table:

>g1
   c1 c2 c1 c2
a1 10 20 50 20
a2  5 40 30 25
>

Now, above the c1 & c2 there should be a b1 and b2.
This is obviously not the correct format for the analyses, since b1 and b2 are not included.
I hope this question is not stupid, but I could not find a single good answer on the net.

  • 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-01T21:34:52+00:00Added an answer on June 1, 2026 at 9:34 pm

    You can change the dim attribute of your current table:

    g1 <- matrix(1:8,nrow=2)
    g1
         [,1] [,2] [,3] [,4]
    [1,]    1    3    5    7
    [2,]    2    4    6    8
    dim(g1)<-c(2,2,2)
    g1
    , , 1
    
         [,1] [,2]
    [1,]    1    3
    [2,]    2    4
    
    , , 2
    
         [,1] [,2]
    [1,]    5    7
    [2,]    6    8
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've recently started checking out XNA. All is going well and I've even got
I have recently started playing around with iOS development and have got most of
I have recently started practicing with sockets on PHP and got an issue for
I recently got into Java. I have a background in dynamic languages and I'm
We have just recently got our SVN server installed. My developers have added the
I've been programming for many years and have just recently got the RoR itch.
I am programming in PHP mysql. I have recently got into OOP programming. So
I have recently started using automapper and it has work fine for me so
I've got a Visual Studio project that recently started throwing a ConfigurationErrorsException, and I
I've recently started converting some of the standard requests I have in my application

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.