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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T06:13:03+00:00 2026-06-10T06:13:03+00:00

Please, put this data structure into R in order to reproduce my example: dX

  • 0

Please, put this data structure into R in order to reproduce my example:

dX <- structure(c(3272.1, 3271.48, 3281.03, 3267.08, 3260.65, NA, 1616.3, 
1620.1, 1639.9, 1637.4, 1669.6, 1662.2, 528.385, 529.268, 531.022, 
532.424, NA, NA), .indexTZ = "", class = c("xts", "zoo"), .indexCLASS = c("POSIXct", 
"POSIXt"), tclass = c("POSIXct", "POSIXt"), tzone = "", index = structure(c(1345147200, 
1345406400, 1345492800, 1345579200, 1345665600, 1345752000), tzone = "", tclass = c("POSIXct", 
"POSIXt")), .Dim = c(6L, 3L), .Dimnames = list(NULL, c("M1WO.Index", 
"GC1.COMB.Comdty", "JGAGGUSD.Index")))

Now try this code:

library(PerformanceAnalytics)
library(quantmod)
library(timeSeries)
charts.PerformanceSummary(R = dX)

and get this error:

Error in UseMethod("time<-") :
  no applicable method for 'time<-' applied to an object of class "c('xts', 'zoo')"

I guess the issue is about the datas whose class = c("xts, "zoo"), but I do not understand why it reads those datas in that format and how may I coerce it to a simple xts object.

How could I solve this issue?

My system:

R version 2.15.1 (2012-06-22)
Platform: i386-pc-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=English_United States.1252 
[2] LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

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

other attached packages:
 [1] timeSeries_2160.94           timeDate_2160.95            
 [3] quantmod_0.3-17              TTR_0.21-1                  
 [5] Defaults_1.1-1               PerformanceAnalytics_1.0.4.4
 [7] xts_0.8-6                    zoo_1.7-7                   
 [9] rcom_2.2-5                   rscproxy_2.0-5              

loaded via a namespace (and not attached):
[1] fBasics_2160.81  fGarch_2110.80.1 grid_2.15.1      lattice_0.20-6  
[5] MASS_7.3-18      stabledist_0.6-4 tools_2.15.1  

When I load packages, I get the following:

Loading required package: zoo

Attaching package: ‘zoo’

The following object(s) are masked from ‘package:base’:

    as.Date, as.Date.numeric

Loading required package: timeDate

Attaching package: ‘timeDate’

The following object(s) are masked from ‘package:PerformanceAnalytics’:

    kurtosis, skewness

Attaching package: ‘timeSeries’

The following object(s) are masked from ‘package:zoo’:

    time<-

According to the error messagge, I guess the issue comes when attaching timeSeries and time<- is masked from package:zoo, which I do not really know what it does mean and how to deal with.

  • 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-10T06:13:03+00:00Added an answer on June 10, 2026 at 6:13 am

    The problem is package timeSeries. Loading it gives the following warning:

    Attaching package: ‘timeSeries’
    
    The following object(s) are masked from ‘package:zoo’:
    
        time<-
    

    You can detach the package for using charts.PerformanceSummary and than load it again:

    detach('package:timeSeries')
    detach('package:timeDate') # since it masks statistical functions
    charts.PerformanceSummary(R = dX)
    library(timeSeries)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please look at this fiddle: http://jsfiddle.net/dyv88/16/ On IE7, if I put width: 100% on
This is my 3rd SO question. Please help again... I want to put up
Can anybody please tell me how to put array values into a string or
Please help me somebody to convert unicodestring into string This is how i am
A team member put this into our project $(function() { $(body).bind(ajaxError, function(event, XMLHttpRequest, ajaxOptions,
Please help in structuring following type of data (example)- > i have 1 table
Please, help me in: how to put a double command in the cmd ,
Would you please help me getting back the typename of the original object put
Can somebody please help me, I want to put the OK symbol throw HTML
For IE7 users, I want to put in some specific Please upgrade now banner.

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.