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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T00:36:16+00:00 2026-06-03T00:36:16+00:00

I find myself recreating nested frequency tables over and over again from articles using

  • 0

I find myself recreating nested frequency tables over and over again from articles using matrix and recreating tables (or sometimes giving up and using rep and making the full data set which is very time consuming. I’m looking for the fastest way (least code) to recreate this nested frequency table in R (I assume this is a question that many can benefit from).

              gender female male
hs.grad race                    
no      asian             3    4
        black             5   10
        white            17   11
yes     asian             5    7
        black             1    9
        white            11   17

This was created using ftable if that’s helpful.

Thank you in advance.

  • 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-03T00:36:17+00:00Added an answer on June 3, 2026 at 12:36 am

    Do you mean something like this?

    file = tempfile()
    cat (text='              gender female male
    hs.grad race                    
    no      asian             3    4
            black             5   10
            white            17   11
    yes     asian             5    7
            black             1    9
            white            11   17
    ', file=file)
    ft = read.ftable(file)
    

    Or

    > read.ftable(textConnection("              gender female male
    + hs.grad race                    
    + no      asian             3    4
    +         black             5   10
    +         white            17   11
    + yes     asian             5    7
    +         black             1    9
    +         white            11   17"))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

As I learn scheme and racket I find myself repeating this pattern again and
I find myself using Resharper's convert to auto property refactoring a lot to remove
I find myself using this method a ton to perform actions based on a
I find myself frequently repeating HTML code to format items such as lists, tables,
I find myself needing to call back into the JVM from arbitrary native threads
I find myself checking to see if javascript elements exist a lot using: if
I find myself using two identical beans in my applicationContext.xml and my applicationContext-test.xml. I'd
I find myself writing the following over and over: if (myEnumerable != null) {
I find myself often using a pattern where I transform a list with a
I find myself revisit areas of my project and refine them again. This usually

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.