Check Whether a File (or Folder) Exists in R
Use the file.exists() function in R to check whether a file or folder exists in a specific directory…
Select Columns by Name in R
When analyzing a data set, sometimes you want to select columns (or variables) by name. This post shares several methods for selecting columns from a data frame by name in the R environment…
Select Columns of a Specific Type in R
When analyzing a data set, sometimes you only want to include columns with a certain data type…
Setting Missing Values When Importing Data
Missing values are a fact of data life. But when you know what values should be set to missing, you can make your life easier by specifying them before importing your data…
Removing Extra Spaces in a (Text) String
Extra spaces in text data are a common problem. This post shares three ways to remove (all) unwanted spaces in a text string in R…
Apply a Process to Multiple Data Sets
Data processing can be streamlined in the R environment when data files have the same variables and general structure…