Apply function to rows of a data frame.
Just like an lapply
on data frames,
but on the rows.
rowLapply(df, fun, ..., unlist = FALSE) rowSapply(df, fun, ..., unlist = FALSE, simplify = TRUE, use.names = TRUE)
df |
[ |
fun |
[ |
... |
[ |
unlist |
[ |
simplify |
[ |
use.names |
[ |
[list
or simplified object]. Length is nrow(df)
.
rowLapply(iris, function(x) x$Sepal.Length + x$Sepal.Width)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.