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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:52:13+00:00 2026-06-15T23:52:13+00:00

While working on a new project in R, I wrote the following code: sp500

  • 0

While working on a new project in R, I wrote the following code:

sp500 <- get.hist.quote("^GSPC",start=(today <- Sys.Date())-735,quote="Cl")
lsp500 <- log(sp500)
rlsp500 <- diff(lsp500)

The problem is the diff() function, it produces the following error:

Error in MATCH(x, x) : could not find function "MATCH"

All other code executes without problems. I’m using RStudio and R version 2.15.2 (2012-10-26) — “Trick or Treat” on Mac OSX 10.8.2.

> sessionInfo()
R version 2.15.2 (2012-10-26)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] tseries_0.10-30

loaded via a namespace (and not attached):
[1] grid_2.15.2     lattice_0.20-10 quadprog_1.5-4  tools_2.15.2    zoo_1.7-9      

What am I missing?

  • 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-15T23:52:13+00:00Added an answer on June 15, 2026 at 11:52 pm

    tseries::get.hist.quote returns a zoo object by default, but the tseries package doesn’t attach zoo, so zoo::MATCH isn’t found. I assume zoo::MATCH is used in diff.zoo or one of the functions called by it.

    Attaching zoo (via library(zoo)) will fix the problem.

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

Sidebar

Related Questions

While working on a school project, I wrote the following code: FileOutputStream fos; ObjectOutputStream
This is my new code, its almost working, but I think my while loop
I have opened many tabs while working on project. (new feature in Xcode 4).
While working with xcode, I saw a new line jmUIImage and i try to
How does QA verify that existing product functionality is still working while verifying new
I've been working with ASP.NET(WebForm) for a while, but new to ASP.NET MVC. From
While working on my final project for my AS/400 Course, I encountered this problem
While working a project tonight, I ended up using one .js resource file for
I am looking to start work on a brand-new project, something I've been thinking
I've been working for a while on my Windows Forms project, and I decided

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.