From cf68d9c407969d38afebc52829d3716adf8ccdb1 Mon Sep 17 00:00:00 2001 From: Arni Magnusson Date: Thu, 27 Apr 2017 23:30:38 +0200 Subject: [PATCH] Swap args 'year' and 'na' in flr2taf() --- R/flr2taf.R | 6 +++--- man/flr2taf.Rd | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/R/flr2taf.R b/R/flr2taf.R index 9c8191f..1ac4c91 100644 --- a/R/flr2taf.R +++ b/R/flr2taf.R @@ -3,9 +3,9 @@ #' Convert a simple crosstab table from FLR to TAF format. #' #' @param x a table of class \code{FLQuant}. -#' @param na a value that should be converted to NA. #' @param year whether the year should be stored in the first column, instead of #' row names. +#' @param na a value that should be converted to NA. #' #' @return #' A data frame with crosstab data. @@ -27,11 +27,11 @@ #' dimnames(x) <- list(age=2:8, year=1991:2000, #' unit="unique", season="all", area="unique", iter=1) #' flr2taf(x) -#' flr2taf(x, na=0, year=FALSE) +#' flr2taf(x, year=FALSE, na=0) #' #' @export -flr2taf <- function(x, na=NULL, year=TRUE) +flr2taf <- function(x, year=TRUE, na=NULL) { y <- as.data.frame(t(drop(unclass(x)))) if(year) diff --git a/man/flr2taf.Rd b/man/flr2taf.Rd index caf5b98..5d04958 100644 --- a/man/flr2taf.Rd +++ b/man/flr2taf.Rd @@ -4,15 +4,15 @@ \alias{flr2taf} \title{Convert FLR table to TAF format} \usage{ -flr2taf(x, na = NULL, year = TRUE) +flr2taf(x, year = TRUE, na = NULL) } \arguments{ \item{x}{a table of class \code{FLQuant}.} -\item{na}{a value that should be converted to NA.} - \item{year}{whether the year should be stored in the first column, instead of row names.} + +\item{na}{a value that should be converted to NA.} } \value{ A data frame with crosstab data. @@ -29,7 +29,7 @@ x <- array(round(runif(70)/3, 1), dim=c(7,10,1,1,1,1)) dimnames(x) <- list(age=2:8, year=1991:2000, unit="unique", season="all", area="unique", iter=1) flr2taf(x) -flr2taf(x, na=0, year=FALSE) +flr2taf(x, year=FALSE, na=0) } \seealso{