This package contains all the functionality to easily create a new metadata scheme. The resulting scheme package will contain all files needed so that it can be easily be distributed and used, and can be either be distributed directly or uploaded to an online repository, e.g. the default dmdScheme repository.
To create your own scheme package entails a few simple steps.
which will open the current scheme including example data in your spreadsheet program of choice.
.xlsx file is locked, you can unlock it by using the password
You can also manually extract the
.xlsx file from any scheme package and use it.
It is important, that the final scheme contains example data as the resulting scheme package has to contain example data.
.xlsx file can be edited following the limitations as specified in the Minimum requirements for metadatascheme based on dmdScheme. After modifications have been done and the spreadsheet has been saved, the scheme package can be created by using
which will create a file named
NAME_VERSION.tar.gz in the directory
path based on the scheme definition in
VERSION are the scheme name and scheme version as specified in the cell
(H:1) in sheet
The following two commands will install the new scheme and use it:
To upload the scheme to the main repository on github, please either clone the repo and send a pull request or file an issue with the scheme package as an attachment.
dmdScheme package is only providing the base functionality for working with dmdSchemes. In many cases, the functionality needs to be extended to be able to work with other schemes. This can be done by creating a new package which is
Similar to the function
package.skeleton() in the
dmdScheme provides a function which creates a package skeleton with the required functionality.
To for example create a package in the folder
path = tempdir() which depends on the R package
dmdScheme and loads and activates upon loading the scheme
emeScheme of version
0.9.5 which is in the default repository:
## Scheme definition `/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/T//Rtmp2pTKaj/file41386467ed49/emeScheme_0.9.5.tar.gz, installed with ## name: emeScheme ## version: 0.9.5
## Theme switched to emeScheme_0.9.5
## Creating directories ...
## Creating DESCRIPTION ...
## Creating NAMESPACE ...
## Creating Read-and-delete-me ...
## Copying code files ...
## Making help files ...
## Further steps are described in '/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/T//Rtmp2pTKaj/emeScheme/Read-and-delete-me'.
## Theme switched to dmdScheme_0.9.5
## Scheme emeScheme_0.9.5 deleted and moved to
##  "/var/folders/50/wcr5bjwn75q595n6x82gxj280000gq/T//Rtmp2pTKaj/file4138630b871e"
NOTE: If the scheme package is not in the default repository, the file
inst/aaa.R in the new package needs to be adapted to automatically anstall and use the scheme!
For an example of an R package of this kind see the R folder in the emeScheme package on github.