summary.act_tbl | R Documentation |
act_tbl
objects.summary.act_tbl
returns a tibble with canonical information about
the activity.
## S3 method for class 'act_tbl'
summary(object, full = FALSE, units = c("imperial", "metric"), ...)
object |
an object for which a summary is desired |
full |
Whether every column should be included, and filled with NA if
missing. Most useful to ensure the tibble has the same shape for
every file, allowing eventual use of |
units |
Which units should be used?
|
... |
Additional arguments. |
This is designed to allow for easy creation of activity summary data
sets by mapping summary over each act_tbl
then using
dplyr::bind_rows()
, purrr::map_dfr()
, or equivalent to create a complete
data set.
Returns a tibble with a single row, containing a summary of the given
act_tbl
.
example_gpx_file <- system.file(
"extdata",
"running_example.gpx.gz",
package = "activatr"
)
act_tbl <- parse_gpx(example_gpx_file)
summary(act_tbl)
## Not run:
files <- list.files("path/to/many/files", pattern = "*.gpx")
gpxs <- files |> purrr::map(\(f) parse_gpx(f))
summaries <- gpxs |> purrr::map_dfr(\(g) summary(g, full = TRUE))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.