Don’t copy and paste the same code over and over again. Instead, create a PowerShell function and save yourself time.
Although there are many functions in the base package of R, sometimes there may not be a function that does exactly what you want. In this case, R allows users to create their own functions and call ...