Skip to content

env[[m]] in ahistory #269

@MarcinKosinski

Description

@MarcinKosinski

@pbiecek have you seen ahistory calls here http://r-addict.com/archivist.github/#32_partial_results_archiving_and_objects%E2%80%99_pedigree_restoration ?

I think this is the result of improving such snippets with asearch

mm <- asearch(patterns = c('class:lm',
                     'coefname:Speciesversicolor'),
        repo = 'pbiecek/graphGallery')

mm %>%
  lapply(function(x) {
    c(r.squared = summary(x)$r.squared,
      x$coef) %>%
      # extract coeffs and R-squared statistic
      t %>%
      as.data.frame # transpose for binding
  }) %>% 
  do.call(dplyr::bind_rows, .) %>% # apply bind_rows to all list elements
  cbind(data.frame(md5hash = names(mm))) %>%
  arrange(r.squared) %>% # arrange rows by r.squared
    unique() %>%
        select(-Sepal.Length) # to fit in the output html

  r.squared (Intercept) Speciesversicolor Speciesvirginica                          md5hash
1 0.6187057    5.006000          0.930000         1.582000 0e213ac68a45b6cd454d06b91f991bc7
2 0.6187057    5.006000          0.930000         1.582000 e58d2f9d50b67ce4d397bf015ec1259c
3 0.9413717    1.462000          2.798000         4.090000 0a82efeb8250a47718cea9d7f64e5ae7
4 0.9413717    1.462000          2.798000         4.090000 378237103bb60c58600fe69bed6c7f11
5 0.9413717    1.462000          2.798000         4.090000 7f11e03539d48d35f7e7fe7780527ba7
6 0.9413717    1.462000          2.798000         4.090000 c1b1ef7bcddefb181f79176015bc3931
7 0.9604273    1.462000          2.507231         3.509429 990861c7c27812ee959f10e5f76fe2c3
8 0.9748944   -1.702342          2.210138         3.090002 2a6e492cb6982f230e48cf46023e2e4f

to have md5hash column

should we fix ahistory to now show the row with env[[m]] ?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions