Top "Tapply" questions

tapply is a function in the R programming language for apply a function to subsets of a vector.

Grouping functions (tapply, by, aggregate) and the *apply family

Whenever I want to do something "map"py in R, I usually try to use a function in the apply …

r lapply sapply tapply r-faq
sum multiple columns by group with tapply

I wanted to sum individual columns by group and my first thought was to use tapply. However, I cannot get …

r tapply
Remove NA from list of lists

I have a matrix, data.mat, that looks like: A B C D E 45 43 45 65 23 12 45 56 NA NA 13 4 34 12 NA I am trying …

r tapply
error in tapply: arguments must have same length

I have imported a set of data into R as a data frame from a .csv file. Originally, I had …

r csv arguments tapply
How to pass na.rm as argument to tapply?

I´d like to calculate mean and sd from a dataframe with one column for the parameter and one column …

r tapply na.rm
Mean of variable by two factors

I have the following data: a <- c(1,1,1,1,2,2,2,2) b <- c(2,4,6,8,2,3,4,1) c <- factor(c("A","B","…

r tapply
Multiple functions in a single tapply or aggregate statement

Is it possible to include two functions within a single tapply or aggregate statement? Below I use two tapply statements …

r aggregate tapply
tapply function complains that args are unequal length yet they appear to match

Here is the failing call, error messages and some displays to show the lengths in question: it <- tapply(…

r tapply
How can I summarise a factor or character variable?

I would like to 'summarise' a factor variable in R, so that for each record I know what factor levels …

r dataframe dplyr tapply
R: How do you apply grep() in lapply()

I would like to apply grep() in R, but I am not really good in lapply(). I understand that lapply …

r lapply sapply tapply