Skip to content

Commit

Permalink
Use format in internal data [no ci] (#352)
Browse files Browse the repository at this point in the history
  • Loading branch information
chainsawriot authored Sep 8, 2023
1 parent f0198a3 commit f89a793
Show file tree
Hide file tree
Showing 7 changed files with 97 additions and 87 deletions.
Binary file modified R/sysdata.rda
Binary file not shown.
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ feature_table$export_function[is.na(feature_table$export_function)] <- ""
feature_table$type <- ifelse(feature_table$type %in% c("suggest"), "Suggest", "Default")
feature_table <- feature_table[,c("format_name", "signature", "import_function", "export_function", "type", "note")]
colnames(feature_table) <- c("Format", "Extensions / \"fmt\"", "Import Package", "Export Package", "Type", "Note")
colnames(feature_table) <- c("Name", "Extensions / \"format\"", "Import Package", "Export Package", "Type", "Note")
knitr::kable(feature_table)
```
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ install_formats()

The full list of supported formats is below:

| Format | Extensions / “fmt” | Import Package | Export Package | Type | Note |
| Name | Extensions / “format” | Import Package | Export Package | Type | Note |
| :---------------------------------- | :--------------------------- | :------------- | :------------- | :------ | :---------------------- |
| Archive files (handled by tar) | bzip2 / xz / gz / gzip / tar | utils | utils | Default | |
| Zip files | zip | utils | utils | Default | |
Expand Down
11 changes: 11 additions & 0 deletions data-raw/convert.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,14 @@ writeLines(
)
rio_formats <- rio::import(here::here("data-raw", "single.json"))
usethis::use_data(rio_formats, overwrite = TRUE, internal = TRUE)

## #351

## old_data <- jsonlite::read_json(here::here("data-raw/single.json"), TRUE)

## new_data <- old_data
## colnames(new_data)[2] <- "format"

## writeLines(jsonlite::prettify(jsonlite::toJSON(new_data)), here::here("data-raw/single.json"))
## rio_formats <- rio::import(here::here("data-raw", "single.json"))
## usethis::use_data(rio_formats, overwrite = TRUE, internal = TRUE)
Loading

0 comments on commit f89a793

Please sign in to comment.