I need help converting a column of 179 observations from an excel file that holds 2 variables (days and values). After i try converting the dataframe with ts(as.vector(a1dataraw['x'], the vector returns with start=1 but also end=1 when it should be 179?
Can someone please identify where im going wrong?
library(TSA)
#Load data
a1dataraw <- read.csv("assignment1data2024.csv", header=TRUE)
a1dataraw
#Convert to TS
a1data <- NA
a1data <- ts(as.vector(a1dataraw['x']), # Read correct column, which is 'x' here.
start= 1)
a1data
The end value is 1 when it should be 179? The csv file has 2 columns with headers Trading days and x for the observations



Using the parameter
endand setting the length of your series should do the trick.