Import RData

General help and assistance with jamovi. Bug reports can be made at our issues page: https://github.com/jamovi/jamovi/issues . (If you're unsure feel free to discuss it here)

by uiptk » Mon May 10, 2021 7:21 am

Hello,

I created a data set in R as follows:

Code: Select all
set.seed(12345)
N <- 78
#N <- 25 # try out fewer cases, works
Data <- data.frame(
   "Num" = runif(N, -1, 1),
   "Fac" = factor(sample(c("Pi", "Tau", "Epsilon", NA), N, repl = TRUE), levels = c("Pi", "Tau", "Epsilon")),
   "Ord" = factor(c(sample(c(1:2, 4:5, 7, NA), N - 7, repl = TRUE), 1:7), labels = LETTERS[1:7], ordered = TRUE),
   "Log" = as.logical(sample(c(0, 1, NA), N, repl = TRUE)),
   "Dat" = as.POSIXct(sample(as.POSIXct("2021-02-23 08:24:45"):as.POSIXct("2021-04-23 23:57:12"), N, repl = FALSE), origin = "1970-01-01 00:00:00")
)
Data <- Data[1:(N-7), ] # remove "pump-up-cases", for retaining unused factor levels
save(Data, file = "Data.RData")


I try to import this data set in Jamovi, Data tab, menu on the left, Import. Select R data files from the filter below, but my RData file does not display. Click Browse and open the RData file:

"Unable to perform import. Invalid file, or file has unsupported features."

If I reduce cases to N = 25, import works (but has issues to be discussed after the cases issue is resolved).

How can this be fixed?

Thanks + cheers,
SV

R 3.6.3 macOS 10.15.7
Jamovi 1.6.23.0
uiptk
 
Posts: 1
Joined: Mon May 10, 2021 7:03 am

by jonathon » Mon May 10, 2021 7:27 am

we use the readstat library for reading data files, and newer versions of R may write newer versions of RData files that it can't open. RData isn't a well supported format outside of R.

i'd suggest just writing .omv files directly:

cran.r-project.org/package=jmvReadWrite

cheers

jonathon
User avatar
jonathon
 
Posts: 1762
Joined: Fri Jan 27, 2017 10:04 am


Return to Help