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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:32:22+00:00 2026-06-18T10:32:22+00:00

I applied a different data set to Joshua Ulrich’s answer at previous question (

  • 0

I applied a different data set to Joshua Ulrich’s answer at previous question (Automatic vlookup and multiply coefficients with R) and it gives an error I haven’t been able to solve.

New dataset:Brazil’s Bovespa index

(sp<-read.csv(“http://www.bolsapt.com/download/historico/%5EBVSP/de-01-01-2000-a-04-02-2013/“)

spLag <- lag(sp)

Error in hasTsp(x) : invalid time series parameters specified

Best regards

  • 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-18T10:32:23+00:00Added an answer on June 18, 2026 at 10:32 am

    @JoshuaUlrich used getSymbols which returns an xts object by default. xts objects are specifically designed to work with time series data. You’re trying to apply the same code to a data.frame which is a more general data class. To create an xts object, you must provide a timeBased index.

    sp.xts <- xts(sp[, 5:9], order.by=as.Date(sp[, 3], format="%Y%m%d"))
    spLag <- lag(sp.xts)
    

    The above converts the YYYYMMDD column to proper Dates and uses that as the index. Note that all columns of an xts object must be of the same class, so I only included numeric columns.

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

Sidebar

Related Questions

I have applied Two different Image Enhancement Algorithm on a particular Image and got
Problem* Given some data (text) which has style applied to it with a loosely
Each record in my report includes (amongst other information) a set of other data
I have the following issue: I extracted a set of data but part of
I have a Map that contains key:value data for properties that are in different
My original data set has 62 variables. For variables c(3:56) I would like to
I have timeseries data from three different sensors over the period of a year,
I applied .drop_cap class to the first letter of every post, such as this:
When i am applied padding:10px to the child div which have the height 100%
I have applied this code for iframe id. <iframe id='<?php echo 'fraDisabled'.$i.$post->ID; ?>' src='<?php

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.