-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding processing scripts for ticket #19667 Russell #12
base: master
Are you sure you want to change the base?
Conversation
R/Angel Chen/ticket #19667 Russell.R
Outdated
|
||
descriptions1 <- c("number of seconds elapsed since 03/02/2008 in Coordinated Universal Time (UTC), recorded when a day began", "number of seconds elapsed since 03/02/2008 in Coordinated Universal Time (UTC), recorded when a day ended") | ||
|
||
wavenumbers <- seq(400, 4000, by=1.92) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this works since you know what the step is for the wavenumbers (and it is an equal step across all the data), but the way I would have done this would leverage the values already in the columns. See suggestion below which leverages the dplyr functions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
w_atts <- data.frame(attributeName = names(dat)) %>%
mutate(wavenumbers = gsub("_", ".", attributeName)) %>%
mutate(attributeDescription = paste("absorbance at wavenumber", wavenumbers)) %>%
select(-wavenumbers)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can then use that to build the rest of your attributes, and stick on the top two using rbind
or add them in shiny_attributes
|
||
pkg <- get_package(adc, 'resource_map_urn:uuid:2a957ad3-1c0f-44e9-b79d-5ea2a2ed76bf', file_names = TRUE) | ||
doc <- read_eml(getObject(adc, pkg$metadata)) | ||
emld::eml_version("eml-2.1.1") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I usually do this near the end but it's smart to do it at the beginning. I just don't usually think about it until the end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hopefully this will be something we won't need to think about as much moving forward with everything in 2.2.0 but yeah we need to keep this in mind when working with older datasets
doc <- eml_add_entity_system(doc) | ||
|
||
CEBP_HumanGeneticData_Summary <- read_csv("~/ticket #20492 Norman/CEBP_HumanGeneticData_Summary.csv") | ||
out <- shiny_attributes(CEBP_HumanGeneticData_Summary, NULL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious what this step was used for, could you explain?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eeerika
Oops, sorry I didn't see your message until now! If I have to make attributes list from scratch and if there are a lot of attribute names, I read in the csv file and plug that as an argument to shiny_attributes() so that the attribute names are already there for me in the shiny app when I open it! I hope that explains it well enough....
doc <- read_eml(getObject(adc, pkg$metadata)) | ||
emld::eml_version("eml-2.1.1") | ||
|
||
set_rights_and_access(adc, pids = unlist(pkg), subject = 'http://orcid.org/0000-0002-5718-6032') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does just writing the subject with http:// instead of https:// replace the need for this step: subject <- sub("^https://", "http://", subject)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes it is convenient for if you have lots of orcids
|
||
datamgmt::categorize_dataset("doi:10.18739/A2CZ32589", c("archaeology","anthropology"), "Angel") | ||
datamgmt::categorize_dataset("doi:10.18739/A2NC5SD2M", c("archaeology","anthropology"), "Angel") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice! seems like you've been able to simplify some steps down through your experience which is cool!
No description provided.