You could use split()
, with rep()
to create the groupings.
n <- 10
nr <- nrow(df)
split(df, rep(1:ceiling(nr/n), each=n, length.out=nr))
More Related Contents:
- How to reproduce a table of student? [closed]
- Why is it not advisable to use attach() in R, and what should I use instead?
- Case Statement Equivalent in R
- How to replace NA with mean by group / subset?
- Controlling ggplot2 legend display order
- How to sort a character vector where elements contain letters and numbers?
- Why is apply() method slower than a for loop in R?
- How do I import a CSV file in R? [closed]
- How to get a reversed, log10 scale in ggplot2?
- Is there a R function that applies a function to each pair of columns?
- Changing Fonts for Graphs in R
- First entry from string split
- World map with ggmap
- Saving a graph with ggsave after using ggplot_build and ggplot_gtable
- How to add a index by set of data when using rbindlist?
- Make readline wait for input in R
- How to export S3 method so it is available in namespace?
- ggplot geom_bar where x = multiple columns
- Change colors in ggpairs now that params is deprecated
- Long Numbers As A Character String
- Trying to merge multiple csv files in R
- Reshape a dataframe to long format with multiple sets of measure columns [duplicate]
- Loop in R markdown
- How can I merge more than 2 dataframes in R by rownames?
- ToolTip when you mouseover a ggplot on shiny
- Row sums over columns with a certain pattern in their name
- In R, getting the following error: “attempt to replicate an object of type ‘closure'”
- Text-mining with the tm-package – word stemming
- Adding percentage labels on pie chart in R
- show multiple plots from ggplot on one page in r