To save and load RDA files in R, yo can use save() and load() functions respectively.

The following methods show how you can do it with syntax.

Method 1: Use save() Function


Method 2: Use load() Function


# Create object

The following examples show how to save and load rda files in R.

Using save() Function

Let’s see how we can use save() function in R:

# Create data frame
df <- data.frame(Machine_name=c("A","B","C","D","E","F"),
                 Pressure=c(78.2, 71.7, 80.21, 83.12, 82.56, 79.50),
                 Temperature=c(31, 35, 36, 36, 38, 32),

# Save dataframe to RDA file

Here in the above code we save dataframe to RDA file using save() function.

Using load() Function

Let’s see how we can use load() function in R:

# Load object from file

# Use object


  Machine_name Pressure Temperature Status
1            A    78.20          31   TRUE
2            B    71.70          35   TRUE
3            C    80.21          36  FALSE
4            D    83.12          36  FALSE
5            E    82.56          38  FALSE
6            F    79.50          32   TRUE

Here the output shows data from sample.Rda which loaded using load() function.