unname(tapply(v, (seq_along(v)-1) %/% n, sum))
# [1] 55 155 255 355 455 555 655 755 855 955
More Related Contents:
- Sum by two variables
- Row-wise sum for select columns while ignoring NAs [closed]
- how to apply a function on a data set?
- Is R’s apply family more than syntactic sugar?
- Is the “*apply” family really not vectorized?
- Remove columns from dataframe where ALL values are NA
- Faster way to read fixed-width files
- R Apply() function on specific dataframe columns
- Concatenate row-wise across specific columns of dataframe
- Remove/collapse consecutive duplicate values in sequence
- Pasting elements of two vectors alphabetically
- Apply a function to every row of a matrix or a data frame
- Why is `vapply` safer than `sapply`?
- Efficiently sum across multiple columns in R
- Is there a R function that applies a function to each pair of columns?
- Why apply() returns a transposed xts matrix?
- ignore NA in dplyr row sum
- How to paste a string on each element of a vector of strings using apply in R?
- Why does as.factor return a character when used inside apply?
- apply a function over groups of columns
- rbind data frames based on a common pattern in data frame name
- Dataframe create new column based on other columns
- Calculate row-wise proportions
- Last Observation Carried Forward In a data frame? [duplicate]
- Sorting rows alphabetically
- use multiple columns as variables with sapply
- Applying a function to two lists?
- Apply function to each column in a data frame observing each columns existing data type
- how to access global/outer scope variable from R apply function?
- Divide each value by the sum of values by group