View source: R/import_from_html.R
import_from_html | R Documentation |
Import a (pre)registration specification from JSON embedded in HTML
import_from_html(x, select = 1)
x |
The HTML as URL, path to a file, or HTML that has already been imported to a character vector. |
select |
If multiple |
The (pre)registration specification.
### Note that this example writes to a local file!
### Temporary file to save to
tmpFile <- tempfile(fileext = ".html");
### Load an example (pre)registration specification
data("examplePrereg_1", package = "preregr");
### Save it to an HTML file
preregr::prereg_spec_to_html(
examplePrereg_1,
file = tmpFile
);
### Import the example again
importedPreregr <-
preregr::import_from_html(
tmpFile
);
### Show the result
preregr::prereg_show_item_completion(
importedPreregr,
section="metadata"
);
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.