gdp <- read.csv("/Users/Haoming Feng/Desktop/501/project/united-states-gdp-gross-domestic-product.csv",header = TRUE)
#Check NA values
is.na(gdp)
#We don't have missing values in gdp dataset
for (i in 1:length(gdp[,1])){
gdp$new1[i] = gdp$GDP...Billions.of.US...[i+1]/gdp$GDP...Billions.of.US...[i]
}
for (i in 1:length(gdp[,1])){
gdp$Trend[i] = gdp$GDP...Billions.of.US...[i+1]>gdp$GDP...Billions.of.US...[i]
}