library(openxlsx) sample1<-read.xlsx("http://kanggc.iptime.org/book/data/sample1-n.xlsx") year<-sample1$year gdp<-sample1$gdp consumption<-sample1$consumption gdp consumption plot(gdp, consumption, main="Scatter plot of GDP and Consumption")