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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T16:48:29+00:00 2026-05-21T16:48:29+00:00

I am new to R. I have an output of a function which when

  • 0

I am new to R. I have an output of a function which when captured in a variable claims it is a list.

> typeof(fc)
[1] "list"

Here are the first few lines of how fc looks like

  Point       Forecast       Lo 80     Hi 80       Lo 95     Hi 95
  10229      -2.237542 -5.81116452  1.336080 -7.70292589  3.227841
  10230       1.683324 -3.19974731  6.566396 -5.78468918  9.151337
  10231       3.893685 -1.32257692  9.109948 -4.08389942 11.871270
  .......

How to I make a vector with only say the Forecast column from this type. I googled around and figured that I should say fc$Forecast. But when I do that I get NULL printed. Much appreciate your time/help. Thanks.

As requested: The last few lines from dput output:

Names = c("method", "model", "level", 
"mean", "lower", "upper", "x", "xname", "fitted", "residuals"
), class = "forecast")

And the first few lines.

structure(list(method = "ARIMA(4,0,2) with non-zero mean", model 
= structure(list(coef = structure(c(0.261848480125606, 0.55212561713038,       
0.00823985719608051, -0.051126398268002, -0.369141509818343, 
1.60863444159457, -0.0928857946719395, -0.0901626797717415, 
0.0526652165617547, -0.242259088064732, 0.164509902811429, 
-0.149744064351169, 0.108818836027556, -0.0143040675162776
), .Names = c("ar1", "ar2", "ar3", "ar4", "ma1", "ma2", "intercept", 
"S1", "C1", "S2", "C2", "S3", "C3", "S4", "C4")), sigma2 = 1.3269817639389, 
var.coef = structure(c(0.494

Inbetween it is just a wall of 3 tuples.

  • 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-21T16:48:30+00:00Added an answer on May 21, 2026 at 4:48 pm

    You are getting the output of print.forecast which is not what the forecast-object actually looks like internally (as can be seen from the fragments of str(fc). AND … The name of the first column is not “Forecast” but rather `Point Forecast” (which will need quoting because of the embedded spaces). So after looking at print.forecast with getAnywhere I predicted you get your desired vector with the obvious modification of this (following execution of the example in help(forecast.Arima):

    > as.data.frame(forecast(fit))$`Point Forecast`
     [1] -0.7725430  0.4591482  0.8732595  1.0124943  1.0593135  1.0750607  1.0803599  1.0821453
     [9]  1.0827486  1.0829539   ### "works"
    

    Therefore… try:

    as.data.frame(fc)$`Point Forecast`
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery function loading a php file which will output some data
Looks like operator new and operator new[] have exactly the same signature: void* operator
I made a similar question a few days ago, but now I have new
I have a function which restricts access to some of the places on my
I currently have a function which I am batch running. It outputs its results
I have a function which executes a select statement. When I attempt to execute
I have a function which creates a zip file. function zipDoc($docRoot,$archiveName,$testsFolder){ $filename = tempnam($testsFolder,
I have a C++ function which returns a multi-line std::string . In the test-case
I have a Sharepoint list which I want to convert to a JSON via
I am new to python and programming in general. I have written a function

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.