Huh / collar

Utilities for exploring telemetry data
Other
6 stars 9 forks source link

key_dir removed from fetch_vectronics #60

Closed HansMartinMT closed 4 years ago

HansMartinMT commented 4 years ago

The fetch_vectronics vignette says that a directory object can be used, however, the function now only takes key_paths. It looks like the key_paths<-get_paths(key_dir) needs to be re-added to the fetch_vectronics function. However, maybe this is not the case the vignette needs to be changed.

Huh commented 4 years ago

Thanks @HansMartinMT I am looking at it now and not sure I am following.

I see get_paths(), which does take a directory and only a directory and returns all files with a given extension. From get_paths definition:

function(key_dir, ext = "keyx$", ...) {
  assertthat::assert_that(assertthat::is.string(key_dir))
  assertthat::assert_that(assertthat::is.dir(key_dir))
  assertthat::assert_that(assertthat::is.readable(key_dir))

  list.files(
    normalizePath(key_dir, winslash = "/", mustWork = TRUE),
    full.names = TRUE,
    pattern = ext,
    ...
  )
}

Are you saying that you want fetch_vectronics to get the keys for you so you don't have to do this in a separate step?

I want to make this more clear if it is confusing, could you point me to a line number or something in the vignette? I am also wondering if the vignette didn't rebuild.

HansMartinMT commented 4 years ago

I just realized what happened. I was looking at the old vignette from when i downloaded the package almost a year ago and the old fetch_vectronics function used the key_dir instead of the key_paths. Sorry about that.

Huh commented 4 years ago

Thanks @HansMartinMT