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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:49:58+00:00 2026-06-17T18:49:58+00:00

I have the following time series data. It has 60 data points shown below.

  • 0

I have the following time series data. It has 60 data points shown below. Please see a simple plot of this data below. I am using R for plotting this. I think that if I draw a moving average curve on the points in the graph, then we can better understand the patterns in the data. I don’t know how to do it in R. Could some one help me to do that. Additionally, I am not sure whether this is a good way to identify patterns or not. Please also suggest me if there is any better way. Thank you.

x <- c(18,21,18,14,8,14,10,14,14,12,12,14,10,10,12,6,10,8,
       14,10,10,6,6,4,6,2,8,6,2,6,4,4,2,8,6,6,8,12,8,8,6,6,2,2,4,
       4,4,8,14,8,6,6,2,6,6,4,4,8,6,6)

graph

  • 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-17T18:50:00+00:00Added an answer on June 17, 2026 at 6:50 pm

    To answer your question about moving averages, you could accomplish it with the help of rollmean which is in package zoo.

    From Joshua's comment: You could also look into TTR package that depends on xts that depends on zoo. Also, there are other moving averages in the package TTR: check ?MA.

    require(TTR)
    # assuming your vector is loaded in dat
    # sliding window / moving average of size 5
    dat.k5 <- rollmean(dat, k=5)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an irregular(?) time series data points in a day as following Jun
I have a time series in the following format: time data value 733408.33 x1
I have this time series data: timestamp depth from_sensor_to_river_bottom Depth_from_river_surface_to_bottom 1 2012-05-23 18:30:12-05 16.4
I am using barchart from the lattice package. I have time series data going
I have imported a time series with dates of the following format: test =
I'm using R. I have 25 variables over 15 time points, with 3 or
I have an intraday 30-second interval time series data in a CSV file with
I've been using SQL Server to store historical time series data for a couple
I have the following data file: Time;Server;Hits 2011.05.05 12:00:01;Server1;12 2011.05.05 12:00:01;Server2;10 2011.05.05 12:00:02;Server1;2 2011.05.05
I have a .dat file of time series data for options so it includes

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.