View source: R/screaming_frog_contract.R
| sf_read_input | R Documentation |
Reads a Screaming Frog export – either an in-memory data frame
or a path to a CSV/Excel file – and returns it with canonical snake_case
column names, validated against the schema for export_kind. Header
aliases are resolved (e.g. "Address", "URL", and
"URI" all map to address), empty strings become NA,
and character columns are trimmed.
sf_read_input(x, export_kind, fields = NULL)
x |
A data frame, or a path to a Screaming Frog CSV/Excel export. |
export_kind |
Character, which export is being read. One of
|
fields |
Optional character vector of additional (non-required) fields
to retain beyond the schema's required set. Default |
A data frame with canonical snake_case columns. The resolved schema
is attached as the "sf_schema" attribute, a list of
export_kind, columns, aliases, and
ignored_columns.
Other Screaming Frog toolkit:
sf_container_from_path(),
sf_contract(),
sf_graph_eligible(),
sf_normalize_position(),
sf_parse_follow(),
sf_region_from_path(),
sf_rel_nofollow()
crawl <- data.frame(
Address = c("https://example.com/", "https://example.com/a"),
`Status Code` = c(200, 200),
check.names = FALSE
)
out <- sf_read_input(crawl, "internal_all")
names(out)
attr(out, "sf_schema")$export_kind
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.