How to save and load data from and to R in the R programming language. More details: statisticsglob...
R code of this video:
data_1 <- c(4, 1, 8, 10, 15) # Create simple example data
data_2 <- 5 # Create another data object
data_3 <- "Hello R User" # Create a third data object
setwd("C:/Users/Joach/Desktop/my directory") # Set working directory
save.image("all_data.RData") # Save entire workspace to directory
load("all_data.RData") # Load workspace back to RStudio
save(data_1, data_2, # Save multiple data objects to directory
file = "data_1_and_2.RData")
load("data_1_and_2.RData") # Load workspace back to RStudio
saveRDS(data_1, # Save single data object to directory
file = "single_data_object.RData")
data_1_reloaded <- readRDS("single_data_object.RData") # Load workspace back to RStudio
Follow me on Social Media:
Facebook - Statistics Globe Page: / statisticsglobecom
Facebook - Group for Discussions & Questions: / statisticsglobe
LinkedIn - Statistics Globe Page: / statisticsglobe
LinkedIn - Group for Discussions & Questions: / 12555223
Twitter: / joachimschork
Music by bensound.com
13 окт 2024