Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

m <- as.

matrix(read_excel("D:/im/stmkg/bahan materi/materi dari dosen/materi


semester VII/praktik_iklim_mikro_dan_agro_klimat_pak_nuryadi/1_Stabilitas Atm dan
Suhu Udara_Tanah/DATA IKLIM MIKRO 2013_BOGOR/01_JANUARI 2013.xls",
sheet = "fklim"))
m1 <- m[c(18:(nrow(m))),c(1,16)]
m1 <- na.omit(m1)
m1 <- m1[-c(nrow(m1),(nrow(m1)-1)),]
colnames(m1) <- c("tanggal", "cal/cm2")

tm <- as.matrix(data.frame(bulan=rep(1,times=nrow(m1))))
mt <- cbind(tm,m1)

sya = 2
while (sya <= 12) {
n <- as.matrix(read_excel(list.files(alamat)[sya],sheet = "fklim"))
n1 <- n[c(18:(nrow(n))),c(1,16)]
n1 <- na.omit(n1)
n1 <- n1[-c(nrow(n1),(nrow(n1)-1)),]
colnames(n1) <- c("tanggal", "cal/cm2")
tn <- as.matrix(data.frame(bulan=rep(sya,times=nrow(n1))))
nt <- cbind(tn,n1)
mt <- rbind(mt,nt)
sya = sya+1
}

mt <- apply(mt,2, as.double)

You might also like