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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:32:52+00:00 2026-05-20T04:32:52+00:00

Here are the first few lines of an R function that works: teetor <-

  • 0

Here are the first few lines of an R function that works:

teetor <- function(x,y) {

require("quantmod")
require("tseries")

alpha <- getSymbols(x, auto.assign=FALSE)
bravo <- getSymbols(y, auto.assign=FALSE)

t     <- as.data.frame(merge(alpha, bravo))

# ... <boring unit root econometric code>

}

When I pass two stock symbols as function parameters, I need to enclose them with quotes:

teetor("GLD", "GDX")

I want to be able to simply type:

teetor(GLD, GDX)
  • 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-20T04:32:53+00:00Added an answer on May 20, 2026 at 4:32 am

    There are several ways of doing this, but generally I wouldn’t advise it.

    Typically calling something without quotes like that means that the object itself is in the search path. One way to do this without assigning it is to use the with() function.

    You can get the name of something without having it actually exist by deparse(substitute(...)):

    > blah <- function(a) {
        deparse(substitute(a))
      }
    > blah(foo) 
    [1] "foo"
    > foo 
    Error: object 'foo' not found
    

    So in principle you can get the names using deparse(substitute(...)) as in the above example in your teetor function instead of passing in the names.

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

Sidebar

Related Questions

First of all, I know there are a few quite similar questions here on
my first question here! I have a problem with a piece of code that
Here is my relevant jQuery code: $.get('sampleData.csv', function(data) { var lines = data.split('\r\n'); The
After reading a few posts here I formulated this function which is sort of
I'm writing a function that fishes out the src from the first image tag
First here's what I'm using and trying to do: the minimal setup for this
First Question in here :) (AS3) First off, how do I access a variable
This is my first here in Stackoverflow. So I just want to ask question
My first post here :) I have a summer job doing a bit of
Here is the first part of my controller code: public class ControlMController : Controller

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.