If you’re just saving a single object, don’t use an .Rdata
file, use an .RDS
file:
x <- 5
saveRDS(x, "x.rds")
y <- readRDS("x.rds")
all.equal(x, y)
Related Contents:
- Can I load a saved R object into a new object name?
- What are the main differences between R data files?
- How to save data file into .RData?
- How to see data from .RData file?
- Get specific object from Rdata file
- Rotating and spacing axis labels in ggplot2
- Replace specific characters within strings
- Filter rows which contain a certain string
- pull out p-values and r-squared from a linear regression
- Order data frame rows according to vector with specific order
- How to save a data.frame in R?
- Order discrete x scale by frequency/value
- Create a matrix of scatterplots (pairs() equivalent) in ggplot2
- Get type of all variables
- `levels
- The cause of “bad magic number” error when loading a workspace and how to avoid it?
- How to add a ggplot2 subtitle with different size and colour?
- Find duplicate values in R [duplicate]
- How can I suppress the vertical gridlines in a ggplot2 plot?
- Keep unused levels in bar plot
- Replacing character values with NA in a data frame
- Convert a dataframe to a vector (by rows)
- Getting Warning: ” ‘newdata’ had 1 row but variables found have 32 rows” on predict.lm
- R Markdown – changing font size and font type in html output
- How to install multiple packages?
- Adding time to POSIXct object in R
- Generate list of all possible combinations of elements of vector
- ggplot2: facet_wrap strip color based on variable in data set
- Combine column to remove NA’s
- How to change the default time zone in R?
- Summarize all group values and a conditional subset in the same call
- The R %in% operator
- R markdown: Accessing variable from code chunk (variable scope) [duplicate]
- Why do R objects not print in a function or a “for” loop?
- Can I get.seed() somehow?
- Is it possible to use spread on multiple columns in tidyr similar to dcast? [duplicate]
- Rotate a Matrix in R by 90 degrees clockwise
- Importing data into R from google spreadsheet
- Finding percentage in a sub-group using group_by and summarise
- Interpolate product attributes
- SparkR vs sparklyr [closed]
- Implementing standard software design patterns (focus on MVC) in R
- R find time when a file was created
- Unable to update R packages in default library on Windows 7
- How to remove rows with inf from a dataframe in R
- Pass a vector of variable names to arrange() in dplyr
- How to indent multiple lines of code in Rstudio?
- predict.lm() in a loop. warning: prediction from a rank-deficient fit may be misleading
- Find names of columns which contain missing values
- How to use dplyr::mutate_all for rounding selected columns