Created
May 26, 2016 23:02
-
-
Save amoeba/dabb6293372dbaa9dce16a2e31b62708 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| library(dataone) | |
| mn <- MNode("https://arcticdata.io/metacat/d1/mn/v2") | |
| pid <- "arctic-data.6230.1" | |
| # Modify System Metadata | |
| sysmeta <- getSystemMetadata(mn, pid) | |
| sysmeta@formatId # You can see that it's "application/vnd.ms-excel" | |
| #' Sytem Metadata formatId values are from a controlled list of identifires | |
| #' that covers a variety of format types. | |
| #' | |
| #' We need to find the format ID for CSV. Go to: | |
| #' | |
| #' https://cn.dataone.org/cn/v2/formats | |
| #' | |
| #' and find 'text/csv'. You can see that it's "Id" is just "text/csv". | |
| sysmeta@formatId <- "text/csv" | |
| sysmeta@formatId | |
| # Now we can just update the System Metadata | |
| updateSystemMetadata(mn, | |
| pid = pid, | |
| sysmeta = sysmeta) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment