create_physical: Create Physical Element

View source: R/physical-element.R

create_physicalR Documentation

Create Physical Element

Description

Create the information of the physical format of the dataset based off of EML standards.

Usage

create_physical(
  file_path,
  number_of_headers = "1",
  record_delimiter = "\\n",
  attribute_orientation = "column",
  field_delimiter = c(",", " ", "\\t", ":"),
  data_url = NULL
)

Arguments

file_path

The file path of the data set being documented. The file size and authentication checksums will be generated from this input.

number_of_headers

Number of header lines preceding the data. A default of "1" is assigned if no input is given. Please refrain from inputting any other value if possible as it is bad practice to do so.

record_delimiter

Character used to delimit records. If no value is inputted the default value of '\n' is assigned.

attribute_orientation

The orientation of the attributes. A default of "column" will be assigned if no input is given.

field_delimiter

Character used to delimit each field. The options provided are commas (","), space (" "), tab ("\t"), or colon (":"). The default is comma, as csv's are most common.

data_url

(Optional). A url, if possible, of which the data file can be downloaded.

Value

A complete set of information on the physical format.

Examples

create_physical(file_path = "User/data/example.csv", 
             number_of_headers = "1",
             record_delimiter = "\\r\\n", 
             attribute_orientation = "column", 
             field_delimiter = ",",
             data_url = "https://mydata.org/etc")
             
create_physical(file_path = "User/data/example.csv",
             data_url = "https://mydata.org/etc")

CVPIA-OSC/EMLaide documentation built on Aug. 25, 2023, 8:53 a.m.