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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:44:53+00:00 2026-05-30T14:44:53+00:00

I have a frequency table: freq.tab <- as.table(rbind(c(1,2,3),c(4,5,6))) I have assigned a function that

  • 0

I have a frequency table:

freq.tab <- as.table(rbind(c(1,2,3),c(4,5,6)))

I have assigned a function that would send this to Word using R2wd,

fun1 <- function(table){wdTable(table)}
fun1(freq.tab)

but I would like to add the table name freq.tab as a title.

Is there any way I can get R to print the table (or any value) name.

Basically, my output in Word should read something like:

freq.table
1 4
2 5
3 6

Obviously, I could do this with wdTitle("freq.table"), but I need something this would fit within the function and be called without resorting to quoted text.

  • 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-05-30T14:44:55+00:00Added an answer on May 30, 2026 at 2:44 pm

    You can get the name of the argument supplied using as.character(substitute(whatever_you_wanted))

    fun1 <- function(table){
        wdTitle(as.character(substitute(table)))    
        wdTable(table)
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table of frequently updated information. This is presented using a container
I have a stored proc that produces a table like this: PeriodStart PeriodEnd TotalActive
I have frequent updates to a user table that simply sets the last seen
Background, Part 1 I have a form that collects both frequency and duration from
I have columns in a mysql table that stores names of people as combinations
I have some irregularly spaced data, say table A. The frequency is every 2-5
Okay, I'll simplify this post. I have a table tasks containing, for example, a
I have a table that contains, among other things, about 30 columns of boolean
I have a table like this: col1 col2 2001 3001 2002 3001 2003 3001
I have a table, which holds (besides all other data) information, when this 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.