-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: mrp_ontology df defining each attr (#20)
- Loading branch information
Showing
12 changed files
with
578 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
## code to prepare `mrp_ontology` df | ||
## DO NOT RUN | ||
## only for reproducibility purposes: edit file at inst/mrp_ontology.csv by hand | ||
# | ||
# library(mregions2) | ||
# | ||
# # Define data frame and get all attributes | ||
# df = data.frame(layer = NULL, column = NULL, type = NULL) | ||
# | ||
# for(layer in mrp_list$layer){ | ||
# c = mrp_colnames(layer) | ||
# df <- rbind(df, c) | ||
# } | ||
# | ||
# # Add order flag | ||
# df$n <- 1:nrow(df) | ||
# | ||
# # Inspect | ||
# View(df) | ||
# | ||
# write.csv2(df, "inst/mrp_ontology.csv", row.names = FALSE, | ||
# fileEncoding = "UTF-8", quote = FALSE) | ||
|
||
path <- system.file("mrp_ontology.csv", package = "mregions2") | ||
mrp_ontology <- read.csv2(path) | ||
|
||
# Drop order flag - internal use only | ||
mrp_ontology$n <- NULL | ||
|
||
# Turn into tibble | ||
attr(mrp_ontology, "class") <- c("tbl_df", "tbl", "data.frame") | ||
|
||
usethis::use_data(mrp_ontology, overwrite = TRUE, ascii = TRUE) | ||
|
||
|
||
|
||
|
Binary file not shown.
Oops, something went wrong.