Month: November 2020
Remove all objects except one or few in R
Sometimes you need an almost fresh start, and, in that case, here is how to remove all objects except one or few in R.
How to get top or bottom values by each group in R
It is easy to return top or bottom values by a group with functions slice_min and slice_max from dplyr in R. If you can’t find those functions, then you have to update dplyr.
Set Excel file read-only MS Teams, OneDrive, or SharePoint
Here is how to set Excel file read-only when using in MS Teams, OneDrive, or SharePoint. Those environments are different in the possibilities to change Excel file settings. Here is a quick walkthrough.
How to categorize numbers in R
Here is my approach on how to categorize numbers by user-defined groups with R. When you have a few predictable groups, you can use the ifelse function. But sometimes, there is a long list of numbers that are changing over time.
How to automatically download files from SharePoint
Here is an example of how to automatically download files from SharePoint Online by using PowerShell. By knowing how to run PowerShell script from the Windows command line (CMD) you can also build a workaround to download files during R or Python script execution.