How to randomly select rows from a dataframe in R

In this tutorial, we will learn how to randomly select rows from a dataframe using dplyr’s slice_sample() function in R. slice_sample() is the new way to randomly select rows either with replacement or without replacement and it supersedes an earlier function sample_n() in dplyr. We will use storms dataset available with ggplot2 R package to… Continue reading How to randomly select rows from a dataframe in R

Exit mobile version