Create a new package (assume that new products have created)

Create metadata in eml
library(EML)

# create metadata information
coverage <- set_coverage(beginDate="2018-07-03", endDate="2018-07-20", 
                         geographicDescription="Chicago", 
                         west=-87.623177, east=-87.623177, 
                         north=41.881832, south=41.881832)
person <- as.person("Seokki Lee <slee195@hawk.iit.edu> [cre]")
slee <- as(person, "creator")
contact <- new("contact", 
               individualName = slee@individualName, 
               electronicMail = slee@electronicMailAddress, 
               organizationName = "IIT", phone="000-000-0000")
pubDate <- "2018-07-03"
title <- "Bundling test for EVOS GoA"
abstract <- "test abs"

dataset <- new("dataset", 
               title=title, 
               creator=slee, 
               pubDate=pubDate, 
               abstract=abstract, 
               coverage=coverage, 
               contact=contact)
eml <- new("eml", system="uuid", dataset=dataset)

# write it into a file
if(!is.null(coverage) & !is.null(person) & !is.null(slee) & !is.null(contact)
   & pubDate != '' & title != '' & abstract != '' & !is.null(dataset)) {
  write_eml(eml, "./meta.xml")  
}

# check the written metadata file is valid
eml_validate("./meta.xml")
## [1] TRUE
## attr(,"errors")
## character(0)
eml
## <eml packageId="1fb4aef2-b9f9-43b1-bd7b-43f8075c5be0" system="uuid" xsi:schemaLocation="eml://ecoinformatics.org/eml-2.1.1 eml.xsd">
##   <dataset>
##     <title>Bundling test for EVOS GoA</title>
##     <creator>
##       <individualName>
##         <givenName>Seokki</givenName>
##         <surName>Lee</surName>
##       </individualName>
##       <electronicMailAddress>slee195@hawk.iit.edu</electronicMailAddress>
##     </creator>
##     <pubDate>2018-07-03</pubDate>
##     <abstract>test abs</abstract>
##     <coverage>
##       <geographicCoverage>
##         <geographicDescription>Chicago</geographicDescription>
##         <boundingCoordinates>
##           <westBoundingCoordinate>-87.623177</westBoundingCoordinate>
##           <eastBoundingCoordinate>-87.623177</eastBoundingCoordinate>
##           <northBoundingCoordinate>41.881832</northBoundingCoordinate>
##           <southBoundingCoordinate>41.881832</southBoundingCoordinate>
##         </boundingCoordinates>
##       </geographicCoverage>
##       <temporalCoverage>
##         <rangeOfDates>
##           <beginDate>
##             <calendarDate>2018-07-03</calendarDate>
##           </beginDate>
##           <endDate>
##             <calendarDate>2018-07-20</calendarDate>
##           </endDate>
##         </rangeOfDates>
##       </temporalCoverage>
##     </coverage>
##     <contact>
##       <individualName>
##         <givenName>Seokki</givenName>
##         <surName>Lee</surName>
##       </individualName>
##       <organizationName>IIT</organizationName>
##       <phone>000-000-0000</phone>
##       <electronicMailAddress>slee195@hawk.iit.edu</electronicMailAddress>
##     </contact>
##   </dataset>
## </eml>
Create a package with newly generated objects
  • Create a package
library(dataone)
library(datapack)
#devtools::install_github("nceas/arcticdatautils")
library(arcticdatautils)

dp <- new("DataPackage")
  • Add metadata into the package
metadataObj <- new("DataObject", format="eml://ecoinformatics.org/eml-2.1.1", filename="./meta.xml")
dp <- addMember(dp, metadataObj)
dp
## Members:
## 
## filename   format    mediaType  size     identifier         modified local 
## meta.xml   eml...1.1 NA         1780     urn:uui...6a9a5124 n        y     
## 
## Package identifier: NA
## RightsHolder: NA
## 
## 
## This package does not contain any provenance relationships.
  • Add objects into the package
# collect lists of files except metadata file
flists <- grep(list.files("."), pattern="\\.xml$", inv=T, value=T)
flists <- grep(flists, pattern="\\.zip$", inv=T, value=T)

# filter out directory names
flists <- setdiff(flists, list.dirs(recursive = FALSE, full.names = FALSE))

for(o in flists) { 
  obj <- new("DataObject", format=guess_format_id(o), filename=paste("./",o,sep=""))
  dp <- addMember(dp, obj, metadataObj)
}

dp
## Members:
## 
## filename        format    mediaType  size     identifier    modified local 
## new_To...lean.R app...eam NA         5010     urn:u...e172a n        y     
## Non-EV...Ns.csv text/csv  NA         3545     urn:u...014d4 n        y     
## rp_hcd...cs.png image/png NA         878319   urn:u...abbdc n        y     
## rp_Tot...WS.csv text/csv  NA         2795130  urn:u...790b4 n        y     
## meta.xml        eml...1.1 NA         1780     urn:u...a5124 n        y     
## PAH.csv         text/csv  NA         5525560  urn:u...024c3 n        y     
## Alkane.csv      text/csv  NA         3932743  urn:u...d988d n        y     
## Sample.csv      text/csv  NA         1500015  urn:u...2aae0 n        y     
## rp_hcd...OA.png image/png NA         430976   urn:u...c6e9a n        y     
## new_hcdbSites.R app...eam NA         3215     urn:u...2969d n        y     
## 
## Package identifier: NA
## RightsHolder: NA
## 
## 
## Relationships (updated):
## 
##                  subject           predicate                object
## 2             Alkane.csv cito:isDocumentedBy              meta.xml
## 5               meta.xml      cito:documents new_Total...s_Clean.R
## 7               meta.xml      cito:documents     Non-EVOS_SINs.csv
## 11              meta.xml      cito:documents rp_hcdbSampleLocs.png
## 15              meta.xml      cito:documents rp_Total_...s_PWS.csv
## 9               meta.xml      cito:documents               PAH.csv
## 1               meta.xml      cito:documents            Alkane.csv
## 17              meta.xml      cito:documents            Sample.csv
## 13              meta.xml      cito:documents rp_hcdbSamplesGOA.png
## 3               meta.xml      cito:documents       new_hcdbSites.R
## 4        new_hcdbSites.R cito:isDocumentedBy              meta.xml
## 6  new_Total...s_Clean.R cito:isDocumentedBy              meta.xml
## 8      Non-EVOS_SINs.csv cito:isDocumentedBy              meta.xml
## 10               PAH.csv cito:isDocumentedBy              meta.xml
## 12 rp_hcdbSampleLocs.png cito:isDocumentedBy              meta.xml
## 14 rp_hcdbSamplesGOA.png cito:isDocumentedBy              meta.xml
## 16 rp_Total_...s_PWS.csv cito:isDocumentedBy              meta.xml
## 18            Sample.csv cito:isDocumentedBy              meta.xml
  • Add “otherEntity” to the metadata
pids <- NULL
for(i in 1:length(flists)) {
  pid <- selectMember(dp, name="sysmeta@fileName", value=flists[i])
  pids <- c(pids, pid)
  flists[i] <- paste("./", flists[i], sep="")
}
entity_df <- data.frame(type="otherEntity", path=flists, pid=pids, format_id=guess_format_id(flists), stringsAsFactors=FALSE)
eml <- eml_add_entities(eml, entity_df)

write_eml(eml, "./meta.xml")
eml_validate("./meta.xml")
## [1] TRUE
## attr(,"errors")
## character(0)
eml
## <eml packageId="0f889169-bf79-435d-b469-f233269cb198" system="uuid" xsi:schemaLocation="eml://ecoinformatics.org/eml-2.1.1 eml.xsd">
##   <dataset>
##     <title>Bundling test for EVOS GoA</title>
##     <creator>
##       <individualName>
##         <givenName>Seokki</givenName>
##         <surName>Lee</surName>
##       </individualName>
##       <electronicMailAddress>slee195@hawk.iit.edu</electronicMailAddress>
##     </creator>
##     <pubDate>2018-07-03</pubDate>
##     <abstract>test abs</abstract>
##     <coverage>
##       <geographicCoverage>
##         <geographicDescription>Chicago</geographicDescription>
##         <boundingCoordinates>
##           <westBoundingCoordinate>-87.623177</westBoundingCoordinate>
##           <eastBoundingCoordinate>-87.623177</eastBoundingCoordinate>
##           <northBoundingCoordinate>41.881832</northBoundingCoordinate>
##           <southBoundingCoordinate>41.881832</southBoundingCoordinate>
##         </boundingCoordinates>
##       </geographicCoverage>
##       <temporalCoverage>
##         <rangeOfDates>
##           <beginDate>
##             <calendarDate>2018-07-03</calendarDate>
##           </beginDate>
##           <endDate>
##             <calendarDate>2018-07-20</calendarDate>
##           </endDate>
##         </rangeOfDates>
##       </temporalCoverage>
##     </coverage>
##     <contact>
##       <individualName>
##         <givenName>Seokki</givenName>
##         <surName>Lee</surName>
##       </individualName>
##       <organizationName>IIT</organizationName>
##       <phone>000-000-0000</phone>
##       <electronicMailAddress>slee195@hawk.iit.edu</electronicMailAddress>
##     </contact>
##     <otherEntity id="urn:uuid:ca242cf1-80ee-4868-bf6c-1e75632d988d" scope="document">
##       <entityName>Alkane.csv</entityName>
##       <physical scope="document">
##         <objectName>Alkane.csv</objectName>
##         <size unit="bytes">3932743</size>
##         <authentication method="SHA-1">82afbae4ebec41c7dbece20800699b755af90ebd</authentication>
##         <dataFormat>
##           <externallyDefinedFormat>
##             <formatName>text/csv</formatName>
##           </externallyDefinedFormat>
##         </dataFormat>
##         <distribution scope="document">
##           <online>
##             <url function="download">https://cn.dataone.org/cn/v2/resolve/urn:uuid:ca242cf1-80ee-4868-bf6c-1e75632d988d</url>
##           </online>
##         </distribution>
##       </physical>
##       <entityType>Other</entityType>
##     </otherEntity>
##     <otherEntity id="urn:uuid:f491c839-5c83-44ef-be2d-0c755c42969d" scope="document">
##       <entityName>new_hcdbSites.R</entityName>
##       <physical scope="document">
##         <objectName>new_hcdbSites.R</objectName>
##         <size unit="bytes">3215</size>
##         <authentication method="SHA-1">81ffa9b9c016bc0e2072f84b50a5f51cfc7b8813</authentication>
##         <dataFormat>
##           <externallyDefinedFormat>
##             <formatName>application/octet-stream</formatName>
##           </externallyDefinedFormat>
##         </dataFormat>
##         <distribution scope="document">
##           <online>
##             <url function="download">https://cn.dataone.org/cn/v2/resolve/urn:uuid:f491c839-5c83-44ef-be2d-0c755c42969d</url>
##           </online>
##         </distribution>
##       </physical>
##       <entityType>Other</entityType>
##     </otherEntity>
##     <otherEntity id="urn:uuid:1b32c360-adfa-4458-9530-856978ee172a" scope="document">
##       <entityName>new_Total_PAH_and_Alkanes_GoA_Hydrocarbons_Clean.R</entityName>
##       <physical scope="document">
##         <objectName>new_Total_PAH_and_Alkanes_GoA_Hydrocarbons_Clean.R</objectName>
##         <size unit="bytes">5010</size>
##         <authentication method="SHA-1">8f0cf927368e3ce2e178e94ab428c6ee31059f5e</authentication>
##         <dataFormat>
##           <externallyDefinedFormat>
##             <formatName>application/octet-stream</formatName>
##           </externallyDefinedFormat>
##         </dataFormat>
##         <distribution scope="document">
##           <online>
##             <url function="download">https://cn.dataone.org/cn/v2/resolve/urn:uuid:1b32c360-adfa-4458-9530-856978ee172a</url>
##           </online>
##         </distribution>
##       </physical>
##       <entityType>Other</entityType>
##     </otherEntity>
##     <otherEntity id="urn:uuid:511572bd-53b8-4583-a032-cf0f8a9014d4" scope="document">
##       <entityName>Non-EVOS_SINs.csv</entityName>
##       <physical scope="document">
##         <objectName>Non-EVOS_SINs.csv</objectName>
##         <size unit="bytes">3545</size>
##         <authentication method="SHA-1">9d901148ece56fd1d94bcb342dff62f6e223f033</authentication>
##         <dataFormat>
##           <externallyDefinedFormat>
##             <formatName>text/csv</formatName>
##           </externallyDefinedFormat>
##         </dataFormat>
##         <distribution scope="document">
##           <online>
##             <url function="download">https://cn.dataone.org/cn/v2/resolve/urn:uuid:511572bd-53b8-4583-a032-cf0f8a9014d4</url>
##           </online>
##         </distribution>
##       </physical>
##       <entityType>Other</entityType>
##     </otherEntity>
##     <otherEntity id="urn:uuid:bcefbd93-ee4c-44ad-8758-be50c7c024c3" scope="document">
##       <entityName>PAH.csv</entityName>
##       <physical scope="document">
##         <objectName>PAH.csv</objectName>
##         <size unit="bytes">5525560</size>
##         <authentication method="SHA-1">9d33d7d966314577e4025330dffc6c4c4adcf5eb</authentication>
##         <dataFormat>
##           <externallyDefinedFormat>
##             <formatName>text/csv</formatName>
##           </externallyDefinedFormat>
##         </dataFormat>
##         <distribution scope="document">
##           <online>
##             <url function="download">https://cn.dataone.org/cn/v2/resolve/urn:uuid:bcefbd93-ee4c-44ad-8758-be50c7c024c3</url>
##           </online>
##         </distribution>
##       </physical>
##       <entityType>Other</entityType>
##     </otherEntity>
##     <otherEntity id="urn:uuid:5ee4e3cb-b1cb-43bb-a103-e2e5fcfabbdc" scope="document">
##       <entityName>rp_hcdbSampleLocs.png</entityName>
##       <physical scope="document">
##         <objectName>rp_hcdbSampleLocs.png</objectName>
##         <size unit="bytes">878319</size>
##         <authentication method="SHA-1">7cebaf157b00ab8060b53bb64a8ab15286a21cfc</authentication>
##         <dataFormat>
##           <externallyDefinedFormat>
##             <formatName>image/png</formatName>
##           </externallyDefinedFormat>
##         </dataFormat>
##         <distribution scope="document">
##           <online>
##             <url function="download">https://cn.dataone.org/cn/v2/resolve/urn:uuid:5ee4e3cb-b1cb-43bb-a103-e2e5fcfabbdc</url>
##           </online>
##         </distribution>
##       </physical>
##       <entityType>Other</entityType>
##     </otherEntity>
##     <otherEntity id="urn:uuid:db8729ad-5a51-4e71-8970-7d28b4ec6e9a" scope="document">
##       <entityName>rp_hcdbSamplesGOA.png</entityName>
##       <physical scope="document">
##         <objectName>rp_hcdbSamplesGOA.png</objectName>
##         <size unit="bytes">430976</size>
##         <authentication method="SHA-1">151ea34041e72fe28160a9be154f09463cc8eaef</authentication>
##         <dataFormat>
##           <externallyDefinedFormat>
##             <formatName>image/png</formatName>
##           </externallyDefinedFormat>
##         </dataFormat>
##         <distribution scope="document">
##           <online>
##             <url function="download">https://cn.dataone.org/cn/v2/resolve/urn:uuid:db8729ad-5a51-4e71-8970-7d28b4ec6e9a</url>
##           </online>
##         </distribution>
##       </physical>
##       <entityType>Other</entityType>
##     </otherEntity>
##     <otherEntity id="urn:uuid:9aad3f5b-973d-4a3f-adb3-597f7f0790b4" scope="document">
##       <entityName>rp_Total_Aromatic_Alkanes_PWS.csv</entityName>
##       <physical scope="document">
##         <objectName>rp_Total_Aromatic_Alkanes_PWS.csv</objectName>
##         <size unit="bytes">2795130</size>
##         <authentication method="SHA-1">52d5d2aeccc9787a35a95bb994f733b693d7a1cb</authentication>
##         <dataFormat>
##           <externallyDefinedFormat>
##             <formatName>text/csv</formatName>
##           </externallyDefinedFormat>
##         </dataFormat>
##         <distribution scope="document">
##           <online>
##             <url function="download">https://cn.dataone.org/cn/v2/resolve/urn:uuid:9aad3f5b-973d-4a3f-adb3-597f7f0790b4</url>
##           </online>
##         </distribution>
##       </physical>
##       <entityType>Other</entityType>
##     </otherEntity>
##     <otherEntity id="urn:uuid:cd2e472d-cba0-4312-9ef1-027fbb52aae0" scope="document">
##       <entityName>Sample.csv</entityName>
##       <physical scope="document">
##         <objectName>Sample.csv</objectName>
##         <size unit="bytes">1500015</size>
##         <authentication method="SHA-1">b1d5b49a4fdd25fe55859e9e4f3373bc830237f7</authentication>
##         <dataFormat>
##           <externallyDefinedFormat>
##             <formatName>text/csv</formatName>
##           </externallyDefinedFormat>
##         </dataFormat>
##         <distribution scope="document">
##           <online>
##             <url function="download">https://cn.dataone.org/cn/v2/resolve/urn:uuid:cd2e472d-cba0-4312-9ef1-027fbb52aae0</url>
##           </online>
##         </distribution>
##       </physical>
##       <entityType>Other</entityType>
##     </otherEntity>
##   </dataset>
## </eml>
  • Replace metadata file in the package
dp <- replaceMember(dp, metadataObj, replacement="./meta.xml", formatId="eml://ecoinformatics.org/eml-2.1.1")
dp
## Members:
## 
## filename        format    mediaType  size     identifier    modified local 
## new_To...lean.R app...eam NA         5010     urn:u...e172a n        y     
## Non-EV...Ns.csv text/csv  NA         3545     urn:u...014d4 n        y     
## rp_hcd...cs.png image/png NA         878319   urn:u...abbdc n        y     
## rp_Tot...WS.csv text/csv  NA         2795130  urn:u...790b4 n        y     
## meta.xml        eml...1.1 NA         9281     urn:u...a5124 y        y     
## PAH.csv         text/csv  NA         5525560  urn:u...024c3 n        y     
## Alkane.csv      text/csv  NA         3932743  urn:u...d988d n        y     
## Sample.csv      text/csv  NA         1500015  urn:u...2aae0 n        y     
## rp_hcd...OA.png image/png NA         430976   urn:u...c6e9a n        y     
## new_hcdbSites.R app...eam NA         3215     urn:u...2969d n        y     
## 
## Package identifier: NA
## RightsHolder: NA
## 
## 
## Relationships (updated):
## 
##                  subject           predicate                object
## 2             Alkane.csv cito:isDocumentedBy              meta.xml
## 5               meta.xml      cito:documents new_Total...s_Clean.R
## 7               meta.xml      cito:documents     Non-EVOS_SINs.csv
## 11              meta.xml      cito:documents rp_hcdbSampleLocs.png
## 15              meta.xml      cito:documents rp_Total_...s_PWS.csv
## 9               meta.xml      cito:documents               PAH.csv
## 1               meta.xml      cito:documents            Alkane.csv
## 17              meta.xml      cito:documents            Sample.csv
## 13              meta.xml      cito:documents rp_hcdbSamplesGOA.png
## 3               meta.xml      cito:documents       new_hcdbSites.R
## 4        new_hcdbSites.R cito:isDocumentedBy              meta.xml
## 6  new_Total...s_Clean.R cito:isDocumentedBy              meta.xml
## 8      Non-EVOS_SINs.csv cito:isDocumentedBy              meta.xml
## 10               PAH.csv cito:isDocumentedBy              meta.xml
## 12 rp_hcdbSampleLocs.png cito:isDocumentedBy              meta.xml
## 14 rp_hcdbSamplesGOA.png cito:isDocumentedBy              meta.xml
## 16 rp_Total_...s_PWS.csv cito:isDocumentedBy              meta.xml
## 18            Sample.csv cito:isDocumentedBy              meta.xml

Record provenance for the computational scripts

Initialize recordr and collect the list of script files
library(recordr)
rc <- new("Recordr")
## A new recordr home directory has been created at:
## 
##  /var/folders/7t/xdmtt00j0w53slb206w9xh100000gn/T//RtmpUYQdBk/recordr
## The recordr package will save run information to this directory, which is under
## the R session temporary directory. Therefore the information that recordr collects
## will be removed by R when the current R session ends.
## 
## If you wish to change the recordr home directory so that information is saved to a
## permanent location please use the "newDir" argument, for example
## 
##  "rc <- new("Recordr", newDir="/Users/bobsmith/recordr")
progFiles <- list.files(".", pattern="\\.R$")
progFiles
## [1] "new_hcdbSites.R"                                   
## [2] "new_Total_PAH_and_Alkanes_GoA_Hydrocarbons_Clean.R"
Capture provenance for each script
for(i in progFiles) {
  record(rc, paste("./",i,sep=""), tag=i)
}
## rgdal: version: 1.3-3, (SVN revision 759)
##  Geospatial Data Abstraction Library extensions to R successfully loaded
##  Loaded GDAL runtime: GDAL 2.3.0, released 2018/05/04
##  Path to GDAL shared files: /usr/local/Cellar/gdal/2.3.0/share/gdal
##  GDAL binary built with GEOS: TRUE 
##  Loaded PROJ.4 runtime: Rel. 5.1.0, June 1st, 2018, [PJ_VERSION: 510]
##  Path to PROJ.4 shared files: (autodetected)
##  Linking to sp version: 1.3-1
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:raster':
## 
##     intersect, select, union
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
## Loading required package: sp
## ### Welcome to rworldmap ###
## For a short introduction type :   vignette('rworldmap')
## Regions defined for each Polygons
## OGR data source with driver: ESRI Shapefile 
## Source: "/Users/eunjungpark/Documents/dataone/DataONE_2018_Summer_Intern_Project1/bundling/new/GIS", layer: "statep010"
## with 62 features
## It has 9 fields
## Capturing file data for fileId urn:uuid:ba3f2823-a160-4477-a3cd-f52859ab7291
## Regions defined for each Polygons
## 'data.frame':    16960 obs. of  72 variables:
##  $ Funding     : Factor w/ 1 level "EVOSTC": 1 1 1 1 1 1 1 1 1 1 ...
##  $ Sin         : int  -600 -600 -557 -557 -900 20120312 20120313 20120310 20120309 20120308 ...
##  $ type        : Factor w/ 6 levels "","-552","-553",..: 6 6 6 6 6 1 1 1 1 1 ...
##  $ Rep         : int  1 2 1 2 1 1 1 1 1 1 ...
##  $ LAB         : Factor w/ 4 levels "ABL","GERG","NECD",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ QCbatch     : Factor w/ 1071 levels "20120827MZ","20120920MZ",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ strMAT      : Factor w/ 17 levels "","part","part, wat",..: 7 7 7 7 7 7 7 7 7 7 ...
##  $ LabSam      : Factor w/ 2164 levels "","-558","-877",..: 2161 2161 2157 2159 2160 1982 1983 1980 1979 1978 ...
##  $ Vol         : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ Proportion  : num  NA NA NA NA NA NA NA NA NA NA ...
##  $ DryWt       : num  1 1 0.00678 0.00678 1 ...
##  $ WetWt       : num  1 1 0.00678 0.00678 1 ...
##  $ AnalysisType: Factor w/ 37 levels "","BLANK","COAL",..: 16 16 19 19 15 11 11 11 11 11 ...
##  $ Catno       : Factor w/ 319 levels "","6100","6101",..: 222 222 222 222 222 319 319 319 319 319 ...
##  $ NaphD8      : num  92.5 92.5 88.7 86.7 108.4 ...
##  $ Acend10     : num  100.6 101.1 94.5 94.2 116.1 ...
##  $ Phend10     : num  101.1 101 94.9 95.2 116.3 ...
##  $ Anthra10    : num  NA NA NA NA NA NA NA NA NA NA ...
##  $ Banth12     : num  NA NA NA NA NA NA NA NA NA NA ...
##  $ Chryd12     : num  104.5 104.8 94.6 93.5 114.3 ...
##  $ Benad12     : num  114 114 115 113 133 ...
##  $ Peryd12     : num  106.5 109.5 89.3 91.8 106.7 ...
##  $ Units       : Factor w/ 7 levels "","ng","ng/device",..: 4 4 5 5 4 5 5 5 5 5 ...
##  $ Naph        : num  247 247 124275 136809 0 ...
##  $ Menap2      : num  180 181 477226 487966 0 ...
##  $ MENAP1      : num  160 161 341500 345107 0 ...
##  $ DIMETH      : num  138 137 501639 503703 0 ...
##  $ C2NAPH      : num  412 412 1784545 1737098 0 ...
##  $ TRIMETH     : num  0 0 237407 239645 0 ...
##  $ C3NAPH      : num  0 0 1602999 1701227 0 ...
##  $ C4NAPH      : num  0 0 961949 990175 0 ...
##  $ BIPHENYL    : num  114 114 23663 23529 111 ...
##  $ ACENTHY     : num  138 134 15476 0 0 ...
##  $ ACENTHE     : num  118 118 16798 16649 0 ...
##  $ FLUORENE    : num  106 107 32643 33024 0 ...
##  $ C1FLUOR     : num  0 0 111440 113162 0 ...
##  $ C2FLUOR     : num  0 0 179608 180330 0 ...
##  $ C3FLUOR     : num  0 0 209519 199383 0 ...
##  $ C4FLUOR     : num  0 0 25311 25879 0 ...
##  $ DITHIO      : num  96.1 96.8 48726.8 45625.9 0 ...
##  $ C1DITHIO    : num  0 0 181422 183124 0 ...
##  $ C2DITHIO    : num  0 0 293077 296922 0 ...
##  $ C3DITHIO    : num  0 0 258189 258230 0 ...
##  $ C4DITHIO    : num  0 0 36010 37554 0 ...
##  $ PHENANTH    : num  245 245 97646 99282 0 ...
##  $ MEPHEN1     : num  202 205 97291 97390 0 ...
##  $ C1PHENAN    : num  978 980 470442 477279 0 ...
##  $ C2PHENAN    : num  0 167 733661 734837 0 ...
##  $ C3PHENAN    : num  0 0 502830 539533 0 ...
##  $ C4PHENAN    : num  0 0 230727 228864 0 ...
##  $ ANTHRA      : num  83.7 84.1 3669.9 2878 0 ...
##  $ FLUORANT    : num  190 189 2667 2660 0 ...
##  $ PYRENE      : num  208 208 8622 8475 0 ...
##  $ C1FLUORA    : num  0 0 40463 38925 0 ...
##  $ C2FLUORA    : num  0 0 83041 87831 0 ...
##  $ C3FLUORA    : num  0 0 65452 59747 0 ...
##  $ C4FLUORA    : num  0 0 46432 45956 0 ...
##  $ BENANTH     : num  107 107 4676 3706 0 ...
##  $ CHRYSENE    : num  104 104 11122 11243 0 ...
##  $ C1CHRYS     : num  89 88.6 26538.6 28080.2 0 ...
##  $ C2CHRYS     : num  0 0 53113 47651 0 ...
##  $ C3CHRYS     : num  0 0 22029 21114 0 ...
##  $ C4CHRYS     : num  0 0 7310 8871 0 ...
##  $ BENZOBFL    : num  193 195 834 1026 0 ...
##  $ BENZOKFL    : num  74.5 74.7 130.6 136.6 0 ...
##  $ BENEPY      : num  108 109 2575 3014 0 ...
##  $ BENAPY      : num  112 113 632 883 0 ...
##  $ PERYLENE    : num  103 102 33971 33769 0 ...
##  $ INDENO      : num  117 113 0 0 0 ...
##  $ DIBENZ      : num  111 112 302 350 0 ...
##  $ BENZOP      : num  142 132 1335 1611 0 ...
##  $ comment     : logi  NA NA NA NA NA NA ...
## -------------------------------------------------------------------------
## You have loaded plyr after dplyr - this is likely to cause problems.
## If you need functions from both plyr and dplyr, please load plyr first, then dplyr:
## library(plyr); library(dplyr)
## -------------------------------------------------------------------------
## 
## Attaching package: 'plyr'
## The following objects are masked from 'package:dplyr':
## 
##     arrange, count, desc, failwith, id, mutate, rename, summarise,
##     summarize
## 'data.frame':    15955 obs. of  53 variables:
##  $ Funding     : Factor w/ 1 level "EVOSTC": 1 1 1 1 1 1 1 1 1 1 ...
##  $ Sin         : int  -902 -902 -902 -902 -902 -902 -902 -902 -902 -902 ...
##  $ type        : Factor w/ 6 levels "","-552","-553",..: 6 6 6 6 6 6 6 6 6 6 ...
##  $ Rep         : int  1 1 1 1 1 1 1 1 1 1 ...
##  $ LAB         : Factor w/ 3 levels "ABL","GERG","NECD": 1 1 1 1 1 1 1 1 1 1 ...
##  $ QCbatch     : Factor w/ 1013 levels "20120827MZ","20120920MZ",..: 1006 145 1004 1003 142 1000 991 161 175 100 ...
##  $ strMAT      : Factor w/ 13 levels "","part","part, wat",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ LabSam      : Factor w/ 1458 levels "","-99","1","1005303",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ Vol         : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ Proportion  : logi  NA NA NA NA NA NA ...
##  $ DryWt       : num  NA NA NA NA NA NA NA NA NA NA ...
##  $ WetWt       : num  1 1 1 1 1 1 1 1 1 1 ...
##  $ AnalysisType: Factor w/ 27 levels "","Coal","COAL",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ Catno       : Factor w/ 311 levels "","6100","6101",..: 144 144 144 144 144 144 144 144 144 144 ...
##  $ C12d26      : num  15.4 40.9 44.4 52.3 56.3 ...
##  $ C16d34      : num  45.2 68.9 77.8 62.3 64.8 ...
##  $ C20d42      : num  79.7 88.6 89.2 79.9 79.1 ...
##  $ C24d50      : num  87.8 92.2 86.9 84.7 82 ...
##  $ C30d64      : num  88.3 96.2 86.1 84.3 70.1 ...
##  $ Units       : Factor w/ 6 levels "","ng","ng/g",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ C9ALK       : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ C10ALK      : num  5799 9024 9399 9067 9731 ...
##  $ C11ALK      : num  7115 9666 9279 9244 9789 ...
##  $ C12ALK      : num  10957 11305 10176 10265 10754 ...
##  $ C13ALK      : num  15396 12642 10918 10936 11227 ...
##  $ C14ALK      : num  6703 8743 7349 9347 9903 ...
##  $ C15ALK      : num  8123 9500 8664 9265 9797 ...
##  $ C16ALK      : num  11290 11966 10943 10940 11554 ...
##  $ C17ALK      : num  14662 13658 12383 12285 13160 ...
##  $ PRISTANE    : num  15357 14620 12439 12720 13234 ...
##  $ C18ALK      : num  10570 12613 12216 11400 12166 ...
##  $ PHYTANE     : num  51.9 83.7 10.6 31 99.4 ...
##  $ C19ALK      : num  10422 11554 10845 10516 11108 ...
##  $ C20ALK      : num  10096 10536 9709 9759 10198 ...
##  $ C21ALK      : num  10345 10350 9295 9685 10083 ...
##  $ C22ALK      : num  10735 11262 10937 10703 10884 ...
##  $ C23ALK      : num  9798 10094 9605 9596 9805 ...
##  $ C24ALK      : num  10298 10559 9773 9919 10220 ...
##  $ C25ALK      : num  9695 10025 9026 9288 9635 ...
##  $ C26ALK      : num  9627 10042 8828 9123 9512 ...
##  $ C27ALK      : num  4097 4298 3642 3791 4000 ...
##  $ C28ALK      : num  10516 10852 10689 10838 10926 ...
##  $ C29ALK      : num  9499 9863 9407 9448 9671 ...
##  $ C30ALK      : num  10179 10519 9718 9672 10053 ...
##  $ C31ALK      : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ C32ALK      : num  10168 10027 9036 8612 8990 ...
##  $ C33ALK      : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ C34ALK      : num  10776 10199 8883 8425 5148 ...
##  $ C35ALK      : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ C36ALK      : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ TOTALKANES  : num  242657 254894 233495 235218 241905 ...
##  $ UCM         : num  7942 0 0 0 0 ...
##  $ comment     : Factor w/ 6 levels "","There were 2 replicate 1 entries.  This is an arbitrary replicate 2",..: 1 1 1 1 1 1 1 1 1 1 ...
List the records
listRuns(rc)
## Seq   Script                         Tag                  Start Time              
## 2     /Users/eunjun...arbons_Clean.R new_Total_PAH_and_Al 2018-07-17 16:40:52 CDT 
## 1     /Users/eunjun...ew_hcdbSites.R new_hcdbSites.R      2018-07-17 16:39:55 CDT
View each record in detail
for(i in 1:length(progFiles)) {
  viewRuns(rc, seq=i) 
}
## [details]: Run details
## ----------------------
## "/Users/eunjungpark/Documents/data...ject1/bundling/new/new_hcdbSites.R" was executed on 2018-07-17 16:39:55 CDT
## Tag: "new_hcdbSites.R"
## Run sequence #: 1
## Publish date: Not published
## Published to: NA
## Published Id: NA
## View at: NA
## Run by user: eunjungpark
## Account subject: NA
## Run Id: urn:uuid:34228f03-7baa-4694-811e-da3eba1ab97d
## Data package Id: urn:uuid:dbe1c562-4f01-4c40-afe8-e8e566788223
## HostId: eunjeong-bag-ui-MacBook-Pro.local
## Operating system: x86_64-apple-darwin13.4.0
## R version: R version 3.3.3 (2017-03-06)
## Dependencies: stats, graphics, grDevices, utils, datasets, methods, base, hash_2.2.6, Rcpp_0.12.17, knitr_1.18, xml2_1.2.0, magrittr_1.5, roxygen2_6.0.1, rappdirs_0.3.1, bit_1.1-14, uuid_0.1-2, R6_2.2.2, blob_1.1.1, plyr_1.8.4, stringr_1.2.0, httr_1.3.1, tools_3.3.3, redland_1.0.17-9, parsedate_1.1.3, DBI_1.0.0, htmltools_0.3.6, commonmark_1.5, bit64_0.9-7, yaml_2.1.16, rprojroot_1.3-2, digest_0.6.15, base64enc_0.1-3, memoise_1.1.0, RSQLite_2.0, evaluate_0.10.1, rmarkdown_1.10, stringi_1.2.3, backports_1.1.2, XML_3.98-1.9, jsonlite_1.5, pkgconfig_2.0.1, recordr_1.0.3.9000, arcticdatautils_0.6.4, datapack_1.3.1, dataone_2.1.1, EML_1.0.3
## Run start time: 2018-07-17 16:39:55 CDT
## Run end time: 2018-07-17 16:40:52 CDT
## Error message from this run: NA
## 
## [used]: 2 items used by this run
## -----------------------------------
## Location                                                     Size (kb)    Modified time      
## /Users/eunjungpark/Documents...otal_Aromatic_Alkanes_PWS.csv 2795130      2018-07-10 12:04:35
## /Users/eunjungpark/Documents...undling/new/GIS/statep010.shp 11171920     2018-07-04 21:53:17
## 
## [generated]: 2 items generated by this run
## -----------------------------------------
## Location                                                     Size (kb)    Modified time      
## /Users/eunjungpark/Documents...ing/new/rp_hcdbSamplesGOA.png 430976       2018-07-10 12:03:59
## /Users/eunjungpark/Documents...ing/new/rp_hcdbSampleLocs.png 878319       2018-07-10 12:04:28
## [details]: Run details
## ----------------------
## "/Users/eunjungpark/Documents/data...d_Alkanes_GoA_Hydrocarbons_Clean.R" was executed on 2018-07-17 16:40:52 CDT
## Tag: "new_Total_PAH_and_Alkanes_GoA_Hydrocarbons_Clean.R"
## Run sequence #: 2
## Publish date: Not published
## Published to: NA
## Published Id: NA
## View at: NA
## Run by user: eunjungpark
## Account subject: NA
## Run Id: urn:uuid:1af36cd3-2384-4aa2-8cec-bb6576f30b6e
## Data package Id: urn:uuid:d0385875-d00f-45b0-a8b0-5d601ec0bea9
## HostId: eunjeong-bag-ui-MacBook-Pro.local
## Operating system: x86_64-apple-darwin13.4.0
## R version: R version 3.3.3 (2017-03-06)
## Dependencies: stats, graphics, grDevices, utils, datasets, methods, base, Rcpp_0.12.17, lattice_0.20-35, assertthat_0.2.0, rprojroot_1.3-2, digest_0.6.15, R6_2.2.2, plyr_1.8.4, backports_1.1.2, RSQLite_2.0, evaluate_0.10.1, spam_2.1-2, httr_1.3.1, pillar_1.2.3, rlang_0.2.1, lazyeval_0.2.1, curl_3.2, uuid_0.1-2, blob_1.1.1, hash_2.2.6, rmarkdown_1.10, labeling_0.3, stringr_1.2.0, foreign_0.8-70, bit_1.1-14, munsell_0.5.0, pkgconfig_2.0.1, base64enc_0.1-3, htmltools_0.3.6, redland_1.0.17-9, tidyselect_0.2.3, tibble_1.4.2, roxygen2_6.0.1, XML_3.98-1.9, withr_2.1.2, commonmark_1.5, rappdirs_0.3.1, grid_3.3.3, jsonlite_1.5, gtable_0.2.0, DBI_1.0.0, magrittr_1.5, scales_0.5.0, stringi_1.2.3, mapproj_1.2.6, parsedate_1.1.3, xml2_1.2.0, tools_3.3.3, bit64_0.9-7, glue_1.2.0, purrr_0.2.5, maps_3.3.0, hms_0.4.2, fields_9.0, yaml_2.1.16, colorspace_1.3-2, maptools_0.9-2, dotCall64_0.9-5, memoise_1.1.0, knitr_1.18, bindr_0.1.1, RColorBrewer_1.1-2, rworldxtra_1.01, rworldmap_1.3-6, sp_1.3-1, bindrcpp_0.2.2, dplyr_0.7.6, rgdal_1.3-3, readr_1.1.1, raster_2.6-7, png_0.1-7, ggplot2_3.0.0, recordr_1.0.3.9000, arcticdatautils_0.6.4, datapack_1.3.1, dataone_2.1.1, EML_1.0.3
## Run start time: 2018-07-17 16:40:52 CDT
## Run end time: 2018-07-17 16:41:00 CDT
## Error message from this run: NA
## 
## [used]: 4 items used by this run
## -----------------------------------
## Location                                                     Size (kb)    Modified time      
## /Users/eunjungpark/Documents...Project1/bundling/new/PAH.csv 5525560      2018-07-03 16:09:24
## /Users/eunjungpark/Documents...ject1/bundling/new/Alkane.csv 3932743      2018-07-03 16:09:18
## /Users/eunjungpark/Documents...ject1/bundling/new/Sample.csv 1500015      2018-07-03 16:09:34
## /Users/eunjungpark/Documents...undling/new/Non-EVOS_SINs.csv 3545         2018-07-03 16:09:45
## 
## [generated]: 1 items generated by this run
## -----------------------------------------
## Location                                                     Size (kb)    Modified time      
## /Users/eunjungpark/Documents...otal_Aromatic_Alkanes_PWS.csv 2795130      2018-07-17 16:41:00

Add the captured provenance into the package

for(i in 1:length(progFiles)) {
  # capture file names and access types
  vr <- viewRuns(rc, seq=i)
  vrdf <- setNames(data.frame(basename(vr$files$filePath), vr$files$access), c("names","access"))
  vrUsed <- setNames(subset(vrdf, vrdf$access == "read"), c("names","acess"))
  vrDerived <- setNames(subset(vrdf, vrdf$access == "write"), c("names","acess"))
  
  # capture ids for sources (those files used and read)
  sids <- NULL
  for(n in 1:length(vrUsed$names)) {
    sid <- selectMember(dp, name="sysmeta@fileName", value=as.character(vrUsed$names[n]))
    sids <- c(sids, sid)
  }
  
  # capture ids for outputs (those files derived)
  oids <- NULL
  for(o in 1:length(vrDerived$names)) {
    oid <- selectMember(dp, name="sysmeta@fileName", value=as.character(vrDerived$names[o]))
    oids <- c(oids, oid)
  }
  
  # capture id for program script
  pid <- selectMember(dp, name="sysmeta@fileName", value=progFiles[i])
  
  # create provenance relationships
  dp <- describeWorkflow(dp, sources=sids, program=pid, derivations=oids)
}
## [details]: Run details
## ----------------------
## "/Users/eunjungpark/Documents/data...ject1/bundling/new/new_hcdbSites.R" was executed on 2018-07-17 16:39:55 CDT
## Tag: "new_hcdbSites.R"
## Run sequence #: 1
## Publish date: Not published
## Published to: NA
## Published Id: NA
## View at: NA
## Run by user: eunjungpark
## Account subject: NA
## Run Id: urn:uuid:34228f03-7baa-4694-811e-da3eba1ab97d
## Data package Id: urn:uuid:dbe1c562-4f01-4c40-afe8-e8e566788223
## HostId: eunjeong-bag-ui-MacBook-Pro.local
## Operating system: x86_64-apple-darwin13.4.0
## R version: R version 3.3.3 (2017-03-06)
## Dependencies: stats, graphics, grDevices, utils, datasets, methods, base, hash_2.2.6, Rcpp_0.12.17, knitr_1.18, xml2_1.2.0, magrittr_1.5, roxygen2_6.0.1, rappdirs_0.3.1, bit_1.1-14, uuid_0.1-2, R6_2.2.2, blob_1.1.1, plyr_1.8.4, stringr_1.2.0, httr_1.3.1, tools_3.3.3, redland_1.0.17-9, parsedate_1.1.3, DBI_1.0.0, htmltools_0.3.6, commonmark_1.5, bit64_0.9-7, yaml_2.1.16, rprojroot_1.3-2, digest_0.6.15, base64enc_0.1-3, memoise_1.1.0, RSQLite_2.0, evaluate_0.10.1, rmarkdown_1.10, stringi_1.2.3, backports_1.1.2, XML_3.98-1.9, jsonlite_1.5, pkgconfig_2.0.1, recordr_1.0.3.9000, arcticdatautils_0.6.4, datapack_1.3.1, dataone_2.1.1, EML_1.0.3
## Run start time: 2018-07-17 16:39:55 CDT
## Run end time: 2018-07-17 16:40:52 CDT
## Error message from this run: NA
## 
## [used]: 2 items used by this run
## -----------------------------------
## Location                                                     Size (kb)    Modified time      
## /Users/eunjungpark/Documents...otal_Aromatic_Alkanes_PWS.csv 2795130      2018-07-10 12:04:35
## /Users/eunjungpark/Documents...undling/new/GIS/statep010.shp 11171920     2018-07-04 21:53:17
## 
## [generated]: 2 items generated by this run
## -----------------------------------------
## Location                                                     Size (kb)    Modified time      
## /Users/eunjungpark/Documents...ing/new/rp_hcdbSamplesGOA.png 430976       2018-07-10 12:03:59
## /Users/eunjungpark/Documents...ing/new/rp_hcdbSampleLocs.png 878319       2018-07-10 12:04:28
## [details]: Run details
## ----------------------
## "/Users/eunjungpark/Documents/data...d_Alkanes_GoA_Hydrocarbons_Clean.R" was executed on 2018-07-17 16:40:52 CDT
## Tag: "new_Total_PAH_and_Alkanes_GoA_Hydrocarbons_Clean.R"
## Run sequence #: 2
## Publish date: Not published
## Published to: NA
## Published Id: NA
## View at: NA
## Run by user: eunjungpark
## Account subject: NA
## Run Id: urn:uuid:1af36cd3-2384-4aa2-8cec-bb6576f30b6e
## Data package Id: urn:uuid:d0385875-d00f-45b0-a8b0-5d601ec0bea9
## HostId: eunjeong-bag-ui-MacBook-Pro.local
## Operating system: x86_64-apple-darwin13.4.0
## R version: R version 3.3.3 (2017-03-06)
## Dependencies: stats, graphics, grDevices, utils, datasets, methods, base, Rcpp_0.12.17, lattice_0.20-35, assertthat_0.2.0, rprojroot_1.3-2, digest_0.6.15, R6_2.2.2, plyr_1.8.4, backports_1.1.2, RSQLite_2.0, evaluate_0.10.1, spam_2.1-2, httr_1.3.1, pillar_1.2.3, rlang_0.2.1, lazyeval_0.2.1, curl_3.2, uuid_0.1-2, blob_1.1.1, hash_2.2.6, rmarkdown_1.10, labeling_0.3, stringr_1.2.0, foreign_0.8-70, bit_1.1-14, munsell_0.5.0, pkgconfig_2.0.1, base64enc_0.1-3, htmltools_0.3.6, redland_1.0.17-9, tidyselect_0.2.3, tibble_1.4.2, roxygen2_6.0.1, XML_3.98-1.9, withr_2.1.2, commonmark_1.5, rappdirs_0.3.1, grid_3.3.3, jsonlite_1.5, gtable_0.2.0, DBI_1.0.0, magrittr_1.5, scales_0.5.0, stringi_1.2.3, mapproj_1.2.6, parsedate_1.1.3, xml2_1.2.0, tools_3.3.3, bit64_0.9-7, glue_1.2.0, purrr_0.2.5, maps_3.3.0, hms_0.4.2, fields_9.0, yaml_2.1.16, colorspace_1.3-2, maptools_0.9-2, dotCall64_0.9-5, memoise_1.1.0, knitr_1.18, bindr_0.1.1, RColorBrewer_1.1-2, rworldxtra_1.01, rworldmap_1.3-6, sp_1.3-1, bindrcpp_0.2.2, dplyr_0.7.6, rgdal_1.3-3, readr_1.1.1, raster_2.6-7, png_0.1-7, ggplot2_3.0.0, recordr_1.0.3.9000, arcticdatautils_0.6.4, datapack_1.3.1, dataone_2.1.1, EML_1.0.3
## Run start time: 2018-07-17 16:40:52 CDT
## Run end time: 2018-07-17 16:41:00 CDT
## Error message from this run: NA
## 
## [used]: 4 items used by this run
## -----------------------------------
## Location                                                     Size (kb)    Modified time      
## /Users/eunjungpark/Documents...Project1/bundling/new/PAH.csv 5525560      2018-07-03 16:09:24
## /Users/eunjungpark/Documents...ject1/bundling/new/Alkane.csv 3932743      2018-07-03 16:09:18
## /Users/eunjungpark/Documents...ject1/bundling/new/Sample.csv 1500015      2018-07-03 16:09:34
## /Users/eunjungpark/Documents...undling/new/Non-EVOS_SINs.csv 3545         2018-07-03 16:09:45
## 
## [generated]: 1 items generated by this run
## -----------------------------------------
## Location                                                     Size (kb)    Modified time      
## /Users/eunjungpark/Documents...otal_Aromatic_Alkanes_PWS.csv 2795130      2018-07-17 16:41:00
dp
## Members:
## 
## filename        format    mediaType  size     identifier    modified local 
## new_To...lean.R app...eam NA         5010     urn:u...e172a n        y     
## Non-EV...Ns.csv text/csv  NA         3545     urn:u...014d4 n        y     
## rp_hcd...cs.png image/png NA         878319   urn:u...abbdc n        y     
## rp_Tot...WS.csv text/csv  NA         2795130  urn:u...790b4 n        y     
## meta.xml        eml...1.1 NA         9281     urn:u...a5124 y        y     
## PAH.csv         text/csv  NA         5525560  urn:u...024c3 n        y     
## Alkane.csv      text/csv  NA         3932743  urn:u...d988d n        y     
## Sample.csv      text/csv  NA         1500015  urn:u...2aae0 n        y     
## rp_hcd...OA.png image/png NA         430976   urn:u...c6e9a n        y     
## new_hcdbSites.R app...eam NA         3215     urn:u...2969d n        y     
## 
## Package identifier: NA
## RightsHolder: NA
## 
## 
## Relationships (updated):
## 
##                  subject             predicate                object
## 40 _70385202...05740b631              rdf:type      prov:Association
## 39 _70385202...05740b631          prov:hadPlan new_Total...s_Clean.R
## 25 _d29ef16e...d4b4e0dc9              rdf:type      prov:Association
## 24 _d29ef16e...d4b4e0dc9          prov:hadPlan       new_hcdbSites.R
## 2             Alkane.csv   cito:isDocumentedBy              meta.xml
## 34            Alkane.csv              rdf:type          provone:Data
## 5               meta.xml        cito:documents new_Total...s_Clean.R
## 7               meta.xml        cito:documents     Non-EVOS_SINs.csv
## 11              meta.xml        cito:documents rp_hcdbSampleLocs.png
## 15              meta.xml        cito:documents rp_Total_...s_PWS.csv
## 9               meta.xml        cito:documents               PAH.csv
## 1               meta.xml        cito:documents            Alkane.csv
## 17              meta.xml        cito:documents            Sample.csv
## 13              meta.xml        cito:documents rp_hcdbSamplesGOA.png
## 3               meta.xml        cito:documents       new_hcdbSites.R
## 4        new_hcdbSites.R   cito:isDocumentedBy              meta.xml
## 26       new_hcdbSites.R              rdf:type       provone:Program
## 6  new_Total...s_Clean.R   cito:isDocumentedBy              meta.xml
## 41 new_Total...s_Clean.R              rdf:type       provone:Program
## 8      Non-EVOS_SINs.csv   cito:isDocumentedBy              meta.xml
## 36     Non-EVOS_SINs.csv              rdf:type          provone:Data
## 10               PAH.csv   cito:isDocumentedBy              meta.xml
## 33               PAH.csv              rdf:type          provone:Data
## 12 rp_hcdbSampleLocs.png   cito:isDocumentedBy              meta.xml
## 21 rp_hcdbSampleLocs.png              rdf:type          provone:Data
## 32 rp_hcdbSampleLocs.png   prov:wasDerivedFrom rp_Total_...s_PWS.csv
## 30 rp_hcdbSampleLocs.png   prov:wasGeneratedBy urn:uuid:...29a520df8
## 14 rp_hcdbSamplesGOA.png   cito:isDocumentedBy              meta.xml
## 20 rp_hcdbSamplesGOA.png              rdf:type          provone:Data
## 31 rp_hcdbSamplesGOA.png   prov:wasDerivedFrom rp_Total_...s_PWS.csv
## 29 rp_hcdbSamplesGOA.png   prov:wasGeneratedBy urn:uuid:...29a520df8
## 16 rp_Total_...s_PWS.csv   cito:isDocumentedBy              meta.xml
## 19 rp_Total_...s_PWS.csv              rdf:type          provone:Data
## 51 rp_Total_...s_PWS.csv   prov:wasDerivedFrom     Non-EVOS_SINs.csv
## 48 rp_Total_...s_PWS.csv   prov:wasDerivedFrom               PAH.csv
## 49 rp_Total_...s_PWS.csv   prov:wasDerivedFrom            Alkane.csv
## 50 rp_Total_...s_PWS.csv   prov:wasDerivedFrom            Sample.csv
## 47 rp_Total_...s_PWS.csv   prov:wasGeneratedBy urn:uuid:...08cd80789
## 18            Sample.csv   cito:isDocumentedBy              meta.xml
## 35            Sample.csv              rdf:type          provone:Data
## 42 urn:uuid:...08cd80789    dcterms:identifier urn:uuid:...08cd80789
## 38 urn:uuid:...08cd80789              rdf:type     provone:Execution
## 37 urn:uuid:...08cd80789 prov:qual...sociation _70385202...05740b631
## 46 urn:uuid:...08cd80789             prov:used     Non-EVOS_SINs.csv
## 43 urn:uuid:...08cd80789             prov:used               PAH.csv
## 44 urn:uuid:...08cd80789             prov:used            Alkane.csv
## 45 urn:uuid:...08cd80789             prov:used            Sample.csv
## 27 urn:uuid:...29a520df8    dcterms:identifier urn:uuid:...29a520df8
## 23 urn:uuid:...29a520df8              rdf:type     provone:Execution
## 22 urn:uuid:...29a520df8 prov:qual...sociation _d29ef16e...d4b4e0dc9
## 28 urn:uuid:...29a520df8             prov:used rp_Total_...s_PWS.csv

Publish the package to DataONE

#d1c <- D1Client("STAGING", "urn:node:mnTestARCTIC")
#pkgId <- uploadDataPackage(d1c, dp, public=TRUE, quiet=FALSE)