This package imports common JMP table encodings using native R. Python and JMP are not runtime dependencies. Compatibility is limited to the documented encodings.
library(jmpread) path <- system.file("extdata", "jmpreader_jl", "example1", "example1.jmp", package = "jmpread") data <- read_jmp(path) data[, c("ints", "floats")]
## ints floats ## 1 1 11.1 ## 2 2 22.2 ## 3 3 33.3 ## 4 4 44.4
Column names and order follow the original table. select and exclude accept exact names.
read_jmp(path, select = c("floats", "ints"), metadata = FALSE)
## ints floats ## 1 1 11.1 ## 2 2 22.2 ## 3 3 33.3 ## 4 4 44.4
data[["char utf8"]]
## [1] "ꙮꙮꙮ" "🚴💨" "jäääär" "辛口" ## attr(,"jmp_metadata") ## attr(,"jmp_metadata")$name ## [1] "char utf8" ## ## attr(,"jmp_metadata")$type_bytes ## [1] 2 2 0 0 0 0 ## ## attr(,"jmp_metadata")$storage ## [1] "character" ## ## attr(,"jmp_metadata")$compressed ## [1] FALSE ## ## attr(,"jmp_metadata")$raw_metadata ## [1] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 00 20 00 00 00 00 00 02 00 00 ## [26] 00 00 00 0b 00 02 00 00 00 40 00 17 00 02 00 00 00 02 00 20 00 02 00 00 00 ## [51] 32 00 2a 00 00 00 00 00 00 00 01 0a 00 00 00 09 08 0a 06 ea 99 ae ea 99 ae ## [76] ea 99 ae f0 9f 9a b4 f0 9f 92 a8 6a c3 a4 c3 a4 c3 a4 c3 a4 72 e8 be 9b e5 ## [101] 8f a3 ## ## attr(,"jmp_metadata")$display_width ## [1] 50
JMP date and time displays store seconds since 1904-01-01. POSIXct preserves time of day even for date-looking values. Durations use difftime. Missing numeric values become NA; empty strings remain empty strings.
data$date
## [1] "2024-01-13 00:00:00 UTC" "2024-01-14 08:49:08 UTC" ## [3] NA "2032-02-12 00:00:00 UTC"
data$duration
## Time differences in secs ## [1] 2322 364 229 0 ## attr(,"jmp_metadata") ## attr(,"jmp_metadata")$name ## [1] "duration" ## ## attr(,"jmp_metadata")$type_bytes ## [1] 1 0 12 133 133 8 ## ## attr(,"jmp_metadata")$storage ## [1] "duration" ## ## attr(,"jmp_metadata")$compressed ## [1] FALSE ## ## attr(,"jmp_metadata")$raw_metadata ## [1] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 00 20 00 00 00 00 00 02 00 ## [26] 00 00 00 00 13 00 02 00 00 00 00 00 17 00 02 00 00 00 00 00 20 00 02 00 00 ## [51] 00 53 00 00 00 00 00 00 24 a2 40 00 00 00 00 00 c0 76 40 00 00 00 00 00 a0 ## [76] 6c 40 00 00 00 00 00 00 00 00 ## ## attr(,"jmp_metadata")$display_width ## [1] 83
read_jmp(path, select = "date", temporal = "raw", metadata = FALSE)
## date ## 1 3787948800 ## 2 3788066948 ## 3 NA ## 4 4043001600
attr(data, "jmp_metadata")$build
## [1] "Jul 23 2023, 19:09:15, Release, JMP, Version 17.2.0"
attr(data[["date"]], "jmp_metadata")$storage
## [1] "date"
Raw post-header blocks are retained, including payload bytes, so metadata can increase memory use. Notes, units, labels and formulas are not exposed as structured fields yet. Formulas are never executed. Row-state columns are lists of raw bytes.
Use a table you created yourself or have documented permission to use.
my_table <- read_jmp("my-data.jmp")
summary(my_table)
Use ?read_jmp for all options and supported encodings. Report problems through the issue tracker, including your R version, package version and a small example you have permission to share.