\pagenumbering{gobble}

knitr::opts_chunk$set(echo = TRUE)

Desembarque total

monthTable = .getMonth.fishery(object=x, language="spanish")
rowNamesTable = rownames(monthTable)
colNamesTable = colnames(monthTable)

monthTable = rbind(monthTable, apply(monthTable, 2, sum, na.rm = TRUE))
rownames(monthTable) = c(rowNamesTable, "Total")
monthTable = cbind(monthTable, apply(monthTable, 1, sum, na.rm = TRUE))
colnames(monthTable) = c(colNamesTable, "Total")

monthTable = round(x = monthTable, digits = 2)

pander::pander(monthTable, align = "c", keep.line.breaks = TRUE)

Desembarque por tipo de flota

fleeTable = x$fleeTable
rowNamesTable = rownames(fleeTable)
colNamesTable = gsub("_", " ", colnames(fleeTable))

fleeTable = rbind(fleeTable, apply(fleeTable, 2, sum, na.rm = TRUE))
rownames(fleeTable) = c(rowNamesTable, "Total")

fleeTable = cbind(fleeTable, apply(fleeTable, 1, sum, na.rm = TRUE))
colnames(fleeTable) = c(colNamesTable, "Total")

fleeTable = round(x = fleeTable, digits = 2)

pander::pander(fleeTable, align = "c", keep.line.breaks = TRUE)

\pagebreak

Desembarque diario, mensual y anual

plot(x, language = "spanish", ploType = "plotDaily", colBar = "black", main = "", daysToPlot = daysToPlot)
plot(x, language = "spanish", ploType = "plotMonthly", colBar = "gray", main = "")
plot(x, language = "spanish", ploType = "plotYearly", colBar = "gray", main = "")

\pagebreak

Desembarque por puerto

portTable = x$data
yearsTable = sort(unique(portTable$year), decreasing = FALSE)

portTable = melt(portTable, id.vars= names(portTable[ , c(1:3)]))
portTable = tapply(portTable$value, list(portTable[, 1], portTable[, 4]), sum)

portInfo = getPort(colnames(portTable))
colnames(portTable) = portInfo$data$name

if(dim(portTable)[2] == 1){
  rowNamesTable = rownames(portTable)
  portTable = rbind(portTable, apply(portTable, 2, sum, na.rm = TRUE))
  rownames(portTable) = c(rowNamesTable, "Total")

} else {
  portTable = portTable[, order(portInfo$data$lat, decreasing = TRUE)]
  portTable = as.data.frame(portTable)

  if(dim(portTable)[2] == 1){
    colnames(portTable) = yearsTable
    rowNamesTable = rownames(portTable)

    portTable = rbind(portTable, apply(portTable, 2, sum, na.rm = TRUE))
    rownames(portTable) = c(rowNamesTable, "Total")

  } else {
    portTable = t(portTable)

    colNamesTable = yearsTable
    rowNamesTable = rownames(portTable)

    portTable = rbind(portTable, apply(portTable, 2, sum, na.rm = TRUE))
    rownames(portTable) = c(rowNamesTable, "Total")
    portTable = cbind(portTable, apply(portTable, 1, sum, na.rm = TRUE))
    colnames(portTable) = c(colNamesTable, "Total")

  }
}
portTable = round(x = portTable, digits = 2)

pander::pander(portTable, align = "c", keep.line.breaks = TRUE)

Desembarque acumulado en el dominio peruano

plot(x, language = "spanish", ploType = "plotPERU", daysToPlot = daysToPlot, textAxis2 = textAxis2, textAxis4 = textAxis4)

Desembarque acumulado en la región Norte-Centro

plot(x, language = "spanish", ploType = "plotNC", daysToPlot = daysToPlot, textAxis2 = textAxis2, textAxis4 = textAxis4)

Desembarque acumulado en la región Sur

plot(x, language = "spanish", ploType = "plotS", daysToPlot = daysToPlot, textAxis2 = textAxis2, textAxis4 = textAxis4)


imarpe/imarpe documentation built on Aug. 8, 2020, 8:40 p.m.