我已经能够解决这个问题了,所以我在这里发布答案以防将来有人需要它.
#### Importing data from .rdb file ####
setwd("path...\\Rsafd\\Rsafd\\data") # Set working directory up to the file that contains
# your .rds and .rdb files.
readRDS("Rdata.rds") # see metadata contained in .rds file
# lazyLoad is the function we use to open a .rdb file:
lazyLoad(filebase = "path...\\Rsafd\\Rsafd\\data\\Rdata", envir = parent.frame())
# for filebase, Rdata is the name of the .rdb file.
# envir is the environment on which the objects are loaded.
Run Code Online (Sandbox Code Playgroud)
使用lazyLoad函数的结果是.rdb文件中包含的每个数据库都在变量环境中显示为"promise".这意味着除非您想要,否则不会打开数据库.
打开它的方法如下:
find(HOWAREYOU) # open the file named HOWAREYOU
head(HOWAREYOU) # look at the first entries, just to make sure
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6581 次 |
| 最近记录: |