Skip to content

Commit f5b7f3e

Browse files
documentation
1 parent cd31852 commit f5b7f3e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

man/nafill.Rd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ nafill(x, type=c("const", "locf", "nocb"), fill=NA, nan=NA)
1414
setnafill(x, type=c("const", "locf", "nocb"), fill=NA, nan=NA, cols=seq_along(x))
1515
}
1616
\arguments{
17-
\item{x}{ Vector, list, data.frame or data.table of numeric columns. }
17+
\item{x}{ Vector, list, data.frame or data.table of logical/numeric columns. }
1818
\item{type}{ Character, one of \emph{"const"}, \emph{"locf"} or \emph{"nocb"}. Defaults to \code{"const"}. }
19-
\item{fill}{ Numeric value to be used to replace missing observations. See examples. }
19+
\item{fill}{ Value to be used to replace missing observations. See examples. }
2020
\item{nan}{ Either \code{NaN} or \code{NA}; if the former, \code{NaN} is treated as distinct from \code{NA}, otherwise, they are treated the same during replacement. See Examples. }
2121
\item{cols}{ Numeric or character vector specifying columns to be updated. }
2222
}

src/nafill.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ SEXP nafillR(SEXP obj, SEXP type, SEXP fill, SEXP nan_is_na_arg, SEXP inplace, S
114114
if (binplace)
115115
error(_("'x' argument is atomic vector, in-place update is supported only for list/data.table"));
116116
else if (!isReal(obj) && !isInteger(obj) && !isLogical(obj))
117-
error(_("'x' argument must be numeric type, or list/data.table of numeric types"));
117+
error(_("'x' argument must be logical/numeric type, or list/data.table of logical/numeric types"));
118118
SEXP obj1 = obj;
119119
obj = PROTECT(allocVector(VECSXP, 1)); protecti++; // wrap into list
120120
SET_VECTOR_ELT(obj, 0, obj1);
@@ -125,7 +125,7 @@ SEXP nafillR(SEXP obj, SEXP type, SEXP fill, SEXP nan_is_na_arg, SEXP inplace, S
125125
for (int i=0; i<length(ricols); i++) {
126126
SEXP this_col = VECTOR_ELT(obj, icols[i]-1);
127127
if (!isReal(this_col) && !isInteger(this_col) && !isLogical(this_col))
128-
error(_("'x' argument must be numeric type, or list/data.table of numeric types"));
128+
error(_("'x' argument must be logical/numeric type, or list/data.table of logical/numeric types"));
129129
SET_VECTOR_ELT(x, i, this_col);
130130
}
131131
R_len_t nx = length(x);

0 commit comments

Comments
 (0)