|
#data <- read.table("C:/tochnex3.csv",sep=",",skip=2,header=FALSE) data <- read.table("tochnex3.csv",sep=",",skip=2,header=FALSE) #ぷらすになっているもの max1 <- max(kougyou,hitai,tyoku) #マイナスのもの
kohbu <- ts.data[,5]#鉱物性燃料 |
____
#data <- read.table("C:/tochnex3.csv",sep=",",skip=2,header=FALSE)
data <- read.table("tochnex3.csv",sep=",",skip=2,header=FALSE)
ts.data <- ts(data,start=c(1999),frequency=1)
tyoku <- ts.data[,2]
kougyou <- ts.data[,3]
shion <- ts.data[,9]
hitai <- ts.data[,13]
tai <- ts.data[,15]
#ぷらすになっているもの
max1 <- max(tai,hitai,tyoku)
min1 <- min(tai,hitai,tyoku)
ttl1 <- "日本の対中国貿易 品目ごとの輸入額-輸出額の推移"
yl="単位:1000ドル"
plot(hitai,ylab=yl,ylim=c(min1,max1),lty=1,main=ttl1)
lines(tyoku,lty=2);lines(tai,lty=3)
hanrei1 <- c("非耐久消費財","食糧・直接消費財","耐久消費財")
legend(locator(1),legend=hanrei1,lty=c(1,2,3))
#マイナスのもの
max2 <- max(shion,kougyou)
min2 <- max(shion,kougyou)
matplot(1999:2009,shion,kougyou,main=ttl1,ylab=yl)
____