Skip to content

Conversation

@KellyWang1126
Copy link

Kelly's code for ticket #20632

Comment on lines +14 to +17
# abstract: a number of the borehole
doc$dataset$abstract <- gsub("\\(C43-MS1\\)", "borehole with number C43-MS1", doc$dataset$abstract)
doc$dataset$abstract <- gsub("45 km", "45 kilometers (km)", doc$dataset$abstract)
doc$dataset$abstract <- gsub("5.2 m", "5.2 meters (m)", doc$dataset$abstract)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't know you could use this to achieve this! I usually use the web editor or str_replace but this is a good way too!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when I know both I get confused between gsub and str_replace because the two has the order of the arguments in slightly different positions (pattern first or string first)

# resource_map_pid = pkg$resource_map,
# data_pids = pkg$data,
# metadata_path = eml_path,
# public = FALSE)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! everything looks very similar to how I would achieve these tasks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants