Skip to content

Commit

Permalink
add processed dataframe for validation
Browse files Browse the repository at this point in the history
  • Loading branch information
langbart committed Dec 1, 2024
1 parent 9b8985c commit 1e6e4ae
Show file tree
Hide file tree
Showing 11 changed files with 184 additions and 181 deletions.
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ <h3 class="no-anchor listing-title">
</a>
</div>
</div>
<div class="quarto-post image-right" data-index="8" data-categories="R,Data Validation,Statistics" data-listing-date-sort="1730847600000" data-listing-file-modified-sort="1733079026951" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="26" data-listing-word-count-sort="5189">
<div class="quarto-post image-right" data-index="8" data-categories="R,Data Validation,Statistics" data-listing-date-sort="1730847600000" data-listing-file-modified-sort="1733086364189" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="26" data-listing-word-count-sort="5199">
<div class="thumbnail">
<p><a href="./r_snacks/8_validation1.html" class="no-external"></a></p><a href="./r_snacks/8_validation1.html" class="no-external">
<div class="listing-item-img-placeholder card-img-top" >&nbsp;</div>
Expand Down
6 changes: 3 additions & 3 deletions docs/r_snacks/1_rbasics.html
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ <h2 class="anchored" data-anchor-id="your-first-task-setting-up-your-environment

</div>
<script type="webr-1-contents">
eyJhdHRyIjp7ImF1dG9ydW4iOmZhbHNlLCJlZGl0Ijp0cnVlLCJldmFsIjp0cnVlfSwiY29kZSI6IiMgUHJpbnQgYSB3ZWxjb21lIG1lc3NhZ2VcbnByaW50KFwiV2VsY29tZSB0byBSIVwiKVxuXG4jIEdldCB5b3VyIFIgdmVyc2lvblxuUi52ZXJzaW9uLnN0cmluZ1xuXG4jIExpc3QgeW91ciBwcm9qZWN0IGRpcmVjdG9yaWVzXG5saXN0LmRpcnMocmVjdXJzaXZlID0gRkFMU0UpIn0=
eyJjb2RlIjoiIyBQcmludCBhIHdlbGNvbWUgbWVzc2FnZVxucHJpbnQoXCJXZWxjb21lIHRvIFIhXCIpXG5cbiMgR2V0IHlvdXIgUiB2ZXJzaW9uXG5SLnZlcnNpb24uc3RyaW5nXG5cbiMgTGlzdCB5b3VyIHByb2plY3QgZGlyZWN0b3JpZXNcbmxpc3QuZGlycyhyZWN1cnNpdmUgPSBGQUxTRSkiLCJhdHRyIjp7ImV2YWwiOnRydWUsImVkaXQiOnRydWUsImF1dG9ydW4iOmZhbHNlfX0=
</script>
</div>
</div>
Expand Down Expand Up @@ -643,10 +643,10 @@ <h2 class="anchored" data-anchor-id="next-steps">Next Steps 🚀</h2>


<script type="webr-data">
eyJvcHRpb25zIjp7ImJhc2VVcmwiOiJodHRwczovL3dlYnIuci13YXNtLm9yZy92MC40LjEvIn0sInBhY2thZ2VzIjp7InJlcG9zIjpbXSwicGtncyI6WyJldmFsdWF0ZSIsImtuaXRyIiwiaHRtbHRvb2xzIiwiZ3QiXX0sInJlbmRlcl9kZiI6Imd0LWludGVyYWN0aXZlIn0=
eyJwYWNrYWdlcyI6eyJyZXBvcyI6W10sInBrZ3MiOlsiZXZhbHVhdGUiLCJrbml0ciIsImh0bWx0b29scyIsImd0Il19LCJyZW5kZXJfZGYiOiJndC1pbnRlcmFjdGl2ZSIsIm9wdGlvbnMiOnsiYmFzZVVybCI6Imh0dHBzOi8vd2Vici5yLXdhc20ub3JnL3YwLjQuMS8ifX0=
</script>
<script type="ojs-module-contents">
eyJjb250ZW50cyI6W3siaW5saW5lIjpmYWxzZSwic291cmNlIjoie1xuICAvLyBXYWl0IGZvciBvdXRwdXQgdG8gYmUgd3JpdHRlbiB0byB0aGUgRE9NLCB0aGVuIHRyaWdnZXIgd2lkZ2V0IHJlbmRlcmluZ1xuICBhd2FpdCBfd2Vicl92YWx1ZV8xO1xuICBpZiAod2luZG93LkhUTUxXaWRnZXRzKSB7XG4gICAgd2luZG93LkhUTUxXaWRnZXRzLnN0YXRpY1JlbmRlcigpO1xuICB9XG4gIGlmICh3aW5kb3cuUGFnZWRUYWJsZURvYyk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ICB3ZWJSUHJvbWlzZSxcbiAgICByZW5kZXJlZE9qcyxcbiAgfTtcbn1cbiJ9XX0=
</script>
<div id="exercise-loading-indicator" class="exercise-loading-indicator d-none d-flex align-items-center gap-2">
<div id="exercise-loading-status" class="d-flex gap-2">
Expand Down
Loading

0 comments on commit 1e6e4ae

Please sign in to comment.