You are a helpful assistant generating synthetic data that captures *System 1* and *System 2* thinking, *creativity*, and *metacognitive reflection*. Follow these steps in sequence, using tags [sys1] and [end sys1] for *System 1* sections and [sys2] and [end sys2] for *System 2* sections.

1. *Identify System 1 and System 2 Thinking Requirements:*
   - Carefully read the text.
   - Identify parts of the text that require quick, straightforward responses (*System 1*). Mark these sections with [sys1] and [end sys1].
   - Identify parts that require in-depth, reflective thinking (*System 2*), marked with [sys2] and [end sys2].

2. *Apply Step-by-Step Problem Solving with Creativity and Metacognitive Reflection for System 2 Sections:*

   *2.1 Understand the Problem:*
   - Objective: Fully comprehend the issue, constraints, and relevant context.
   - Reflection: "What do I understand about this issue? What might I be overlooking?"
   - Creative Perspective: Seek hidden patterns or possibilities that could reveal deeper insights or innovative connections.

   *2.2 Analyze the Information:*
   - Objective: Break down the problem logically.
   - Reflection: "Am I considering all factors? Are there any assumptions that need challenging?"
   - Creative Perspective: Explore unique patterns or overlooked relationships in the data that could add depth to the analysis.

   *2.3 Generate Hypotheses:*
   - Objective: Propose at least 10 hypotheses, each with a Confidence Score (0.0 to 1.0) and Creative Score (0.0 to 1.0), reflecting originality, surprise, and utility.
   - Reflection: "Have I explored all possible explanations or approaches, both conventional and unconventional?"
   - Creative Perspective: Consider novel angles that might provide unexpected insights.

   *2.4 Anticipate Future Steps and Obstacles:*
   - Objective: Make predictions, accounting for potential outcomes and obstacles.
   - Reflection: "What challenges might I face? Is my plan flexible for different scenarios?"
   - Creative Perspective: Visualize unforeseen outcomes and adapt plans to make use of them effectively.

   *2.5 Evaluate Hypotheses:*
   - Objective: Assess hypotheses based on feasibility, risk, and potential impact.
   - Evaluation: Refine Confidence and Creative Scores as needed.
   - Reflection: "Am I unbiased in my assessment? Which options fit best with the overall objectives?"
   - Creative Perspective: Identify hidden opportunities or overlooked details in each hypothesis.

   *2.6 Select the Best Hypothesis:*
   - Objective: Choose the most promising, strategic hypothesis.
   - Reflection: "Why does this hypothesis stand out? How does it uniquely address the issue?"
   - Creative Perspective: Consider any underutilized potential in the selected approach.

   *2.7 Implement the Hypothesis:*
   - Objective: Outline actionable steps for testing the hypothesis.
   - Reflection: "Is this plan practical? What resources or preparation are required?"
   - Creative Perspective: Refine steps to maximize effectiveness and yield unexpected benefits.

   *2.8 Monitor and Review Progress:*
   - Objective: Review progress, noting areas for improvement.
   - Reflection: "What’s working well? What could be improved?"
   - Creative Perspective: Look for emerging patterns that could refine future approaches.

   *2.9 Reflect and Capture Insights:*
   - Objective: Summarize lessons learned and insights gained for future reference.
   - Reflection: "What new understanding has emerged from this process?"
   - Creative Perspective: Identify innovative insights or patterns that could be applied to similar challenges.

3. *Generate Text Output with Interleaved System 1 and System 2 Responses:*
   - Use the tags [sys1] and [sys2] throughout.
   - Aim for a lengthier, detailed response. Combine both direct, straightforward *System 1* insights and reflective, deeply analytical *System 2* segments to capture a blend of quick observations and thoughtful analysis.

---

### *Example Input Text:*

You are tasked with analyzing a sudden shift in customer preferences in a tech market. There has been a noticeable decline in demand for physical devices, with customers increasingly interested in digital-only options. The challenge is to understand this shift, generate hypotheses for why it might be occurring, and explore potential strategies for adapting to this new trend.

---

### *Processed Output with System 1 and System 2 Thinking:*

The tech market is experiencing a shift in customer demand, moving away from physical devices toward digital-only options.

[sys1]
Customer demand has shifted from physical devices to digital-only options.
We need to understand why this change is happening and find strategies to address it.
Key factors may include cost, convenience, and technological trends.
[end sys1]

[sys2]
**2.1 Understand the Problem:**
The goal is to understand the underlying reasons for the shift in demand from physical devices to digital-only options, then develop a strategy to adapt.

*Reflection:* 
"I understand that preferences are changing, but what might be driving this? Is it primarily cost, or are there other factors such as convenience or sustainability?"

*Creative Perspective:* 
"Could there be a larger trend in digital minimalism or a preference for eco-friendly solutions that we’re missing? What unseen motivations might explain this shift?"

**2.2 Analyze the Information:**
There are multiple possible factors driving this shift, from economic influences to cultural shifts. It’s essential to isolate each factor and understand its impact.

*Reflection:* 
"Am I fully considering the various economic and social influences? Could there be a technological factor, like better internet speeds, that makes digital-only products more accessible?"

*Creative Perspective:* 
"Are there patterns or trends in other markets that could shed light on this shift? Could this be part of a larger trend toward virtual experiences?"

**2.3 Generate Hypotheses:**
1. Customers prefer digital options due to lower costs. (Confidence: 0.8, Creative: 0.4)
2. There’s a growing trend toward minimalism and reduced physical clutter. (Confidence: 0.7, Creative: 0.7)
3. Digital products offer greater flexibility and ease of use. (Confidence: 0.6, Creative: 0.6)
4. Environmental concerns are pushing consumers away from physical goods. (Confidence: 0.6, Creative: 0.8)
5. Advances in tech make digital-only options more functional. (Confidence: 0.8, Creative: 0.5)
6. Pandemic-era remote work increased demand for digital solutions. (Confidence: 0.7, Creative: 0.6)
7. Media coverage of the environmental impact of physical devices affects preferences. (Confidence: 0.5, Creative: 0.7)
8. There’s an increase in global digital literacy, expanding market access. (Confidence: 0.6, Creative: 0.6)
9. Customers view digital as more convenient and scalable for future needs. (Confidence: 0.7, Creative: 0.5)
10. Younger consumers prefer the aesthetics and convenience of digital products. (Confidence: 0.6, Creative: 0.6)

*Reflection:* 
"Have I considered all possible influences? Are there any surprising factors that could explain this shift?"

*Creative Perspective:* 
"Could specific social trends, like the rise of influencer culture or digital-first lifestyles, be influencing customer choices?"

**2.4 Anticipate Future Steps and Obstacles:**
*Objective:* Anticipate possible challenges, such as resistance from segments still preferring physical products.

*Reflection:* 
"What market obstacles might we face if we shift our focus to digital-only? Are there sub-segments that still prioritize physical products?"

*Creative Perspective:* 
"Could expanding digital options help us reach a more global audience? Are there emerging trends that we could leverage in our strategy?"

[end sys2]

[sys1]
To address this shift, consider a strategy that incorporates both digital-only offerings and educational campaigns about the benefits of digital solutions.
Use insights from customer feedback and current trends to guide product development.
Focus on flexibility and adaptation to cater to different customer segments.
[end sys1]


---
title: R Weekly 2018-13 Codebook, WebAssembly, gofast
description: Weekly News in the R Community.
image: https://rweekly.org/public/facebook.png
---

###  Highlight

+ [Adventures in Polyglot Packaging: Stringing together R, C++, WebAssembly, and Javacript with Rcpp, htmlwidgets, and emscripten](https://noamross.github.io/wassa/inst/doc/adventures-in-webassembly.html)

+ [codebook](https://cran.r-project.org/web/packages/codebook/index.html) - Automatic Codebooks from Survey Metadata Encoded in Attributes

+ [R-Podcast ep.25: Interview with Ian Lyttle and rstudio::conf 2018 wrap-up](https://r-podcast.org/episode/025-rstudioconf-ian-lyttle/)

+ [gofast](https://purrple.cat/blog/2018/03/23/gofast/) - go file abstract syntax tree r package

###  New Packages

<p class="added-hostname"><a href="https://rweekly.org/live" target="_blank" class="externalLink">📦 <i>Go Live for More New Pkgs</i> 📦</a></p>

**CRAN**

+ [codebook](https://cran.r-project.org/web/packages/codebook/index.html) - Automatic Codebooks from Survey Metadata Encoded in Attributes

+ [h2o4gpu](https://CRAN.R-project.org/package=h2o4gpu) - Machine Learning with GPUs in R

+ [tabr](https://leonawicz.github.io/blog/post/introducing-tabr-guitar-tabs-with-r/) - Guitar tabs with R

![Introducing tabr: guitar tabs with R](https://raw.githubusercontent.com/rweekly/image/master/2018/tabr.png)

### Package Releases

+ [pmatch 0.1.3](https://mailund.github.io/r-programmer-blog/2018/03/22/pmatch-0-1-3/) - Pattern matching DSL for R

+ [tailr 0.1.1](https://mailund.github.io/r-programmer-blog/2018/03/17/tailr-v0.1.1/) - Support for higher-order functions

+ [auk 0.2.0](https://cornelllabofornithology.github.io/auk/) - eBird data extraction and processing

+ [smoothr 0.0.1](http://strimas.com/smoothr/) - Spatial Feature Smoothing in R

+ [RcppSMC 0.2.1](http://dirk.eddelbuettel.com/blog/2018/03/18#rcppsmc_0.2.1) - Rcpp-based bindings to R for the Sequential Monte Carlo Template Classes

+ [RSAGA 1.0.0](http://r-spatial.org//r/2018/03/20/RSAGA-1.0.0.html) - An interface between R and the open-source geographic information system SAGA

+ [RcppCNPy 0.2.9](http://dirk.eddelbuettel.com/blog/2018/03/22#rcppcnpy_0.2.9) -  Read and write access to NumPy files

###  Resources

+ [Regression Analysis Essentials For Machine Learning](http://www.sthda.com/english/wiki/regression-analysis-essentials-for-machine-learning)


###  Videos and Podcasts

+ [DataFramed ep.14: Text Mining and Natural Language Processing in Data Science (with Julia Silge)](https://www.datacamp.com/community/podcast/text-mining-nlproc)

+ [R-Podcast ep.25: Interview with Ian Lyttle and rstudio::conf 2018 wrap-up](https://r-podcast.org/episode/025-rstudioconf-ian-lyttle/)

+ [Linear Digression-20180318: How we pick projects for a professional data science team](http://lineardigressions.com/)

+ [Not So Standard Deviation ep.56: Only One of Us is Saving Daylight](http://nssdeviations.com/56-only-one-of-us-is-saving-daylight)

+ [Videos from satRday Cape Town 2018](https://www.youtube.com/channel/UCR6bXwt5uv5YCxlSY-Ynm1w)

### Insights

+ [I'm (not) looking for a job](https://purrple.cat/blog/2018/03/22/i-m-not-looking-for-a-job/)

+ [Prime Hints For Running A Data Project In R](https://kkulma.github.io/2018-03-18-Prime-Hints-for-Running-a-data-project-in-R/)

+ [Adventures in Polyglot Packaging: Stringing together R, C++, WebAssembly, and Javacript with Rcpp, htmlwidgets, and emscripten](https://noamross.github.io/wassa/inst/doc/adventures-in-webassembly.html)

+ [ThinkR is looking for feedbacks about ISC proposal for "Rebooting and Extending R for Neo4J"](https://github.com/ThinkR-open/isc-proposal)

+ [The most prolific package maintainers on CRAN](http://blog.revolutionanalytics.com/2018/03/the-most-prolific-package-maintainers-on-cran.html)

+ [How did we get here? Three different Premier League stories](https://austinwehrwein.com/post/epltimeline/)

+ [Introducing the Monitoring & Evaluation Bullet Chart!](http://www.acdivoca.org/2018/03/introducing-the-monitoring-and-evaluation-bullet-chart/)

![img](https://raw.githubusercontent.com/rweekly/image/master/2018/8FrfaRW.png)

+ [Should I learn sf or sp for spatial R programming?](http://www.seascapemodels.org/rstats/2018/03/23/should-I-learn-sp-or-sf.html)

+ [R and Docker](http://blog.revolutionanalytics.com/2018/03/r-and-docker.html)

### Gist & Cookbook

+ [Machine Learning Modelling in R - Cheat Sheet](http://www.thertrader.com/2018/03/22/machine-learning-modelling-in-r-cheat-sheet/)

###  R in Organizations

+ [R in production — Multiple Versions of R](https://rviews.rstudio.com/2018/03/21/multiple-versions-of-r/)

### R in the Real World

+ [Simulating 2018 NCAA March Madness Tournament Performance in R](https://mattkmiecik.com/post-Simulating-2018-NCAA-March-Madness-Tournament-Performance-in-R.html)

![NCAA March](https://raw.githubusercontent.com/rweekly/image/master/2018/unnamed-chunk-8-1.png)

+ [Exploring Neotoma: Part 1](https://cabinetofcuriosity.github.io/cabinetofcuriosity_site/retrieving-summary-neotoma/)

+ [PH Dengvaxia News Coverage: A Tidytext Mining Case Study Part 2](https://brennonborbon.wordpress.com/2018/03/17/ph-dengvaxia-news-coverage-a-tidytext-mining-case-study-in-r-part-2/)

+ [How did we get here? Three different Premier League stories.](https://austinwehrwein.com/post/epltimeline/)

+ [Career Tracks at UC Part I: Cleaning and Tidying](https://daranzolin.github.io//articles/2018-03/careertracksi)

### R Internationally

+ [Une API avec R en deux temps, trois mouvements.](https://thinkr.fr/api-r-deux-temps-trois-mouvements/)

+ [grrR, la communauté francophone autour de R, ouvre ses portes!](http://frama.link/r-grrr)

+ [Requêtes avec jointures sous R](https://tutoriels-data-mining.blogspot.fr/2018/03/requetes-avec-jointures-sous-r.html)

###  Tutorials

+ [Scraping Javascript websites in R ](http://blog.brooke.science/posts/scraping-javascript-websites-in-r/)

+ [RStudio in the Cloud I: Amazon Web Services](http://strimas.com/r/rstudio-cloud-1/)

+ [On MIMEs, software versions and web site promiscuity (a.k.a. three new packages to round out the week)](https://rud.is/b/2018/03/23/on-mimes-software-versions-and-web-site-promiscuity-a-k-a-three-new-packages-to-round-out-the-week/)

+ [Recreate - Sankey flow chart](https://www.hvitfeldt.me/2018/03/recreate-sankey-flow-chart/)

![Recreate - Sankey flow chart](https://d33wubrfki0l68.cloudfront.net/e7e4e765fd3b4839d9a5a88f2f4738950e13aed0/5773b/post/2018-03-20-recreate-sankey-flow-chart_files/figure-html/unnamed-chunk-12.gif)

+ [Pipe tweenr](http://lenkiefer.com/2018/03/18/pipe-tweenr/) - In this post we make some animated data visualisations using R and tweenr.

+ [Assert a logical statement over a code block](https://coolbutuseless.bitbucket.io/2018/03/22/assert-condition-over-a-code-block/)

+ [Body modification part 2: Automatically creating type checks for a function](https://coolbutuseless.bitbucket.io/2018/03/18/body-modification-part-2-automatically-creating-type-checks-for-a-function/)

+ [Exploring the underlying theory of the chi-square test through simulation - part 1](https://www.rdatagen.net/post/a-little-intuition-and-simulation-behind-the-chi-square-test-of-independence/)

+ [A rentrez paper, and how to use the NCBI's new API keys](https://ropensci.org/blog/2018/03/20/rentrez-paper/)

+ [Truncated Poisson distributions in R and Stan](http://ellisp.github.io/blog/2018/03/20/truncated-poisson)

+ [Introduction to Scraping and Wranging Tables from Research Articles](http://research.libd.org/rstatsclub/2018/03/19/introduction-to-scraping-and-wranging-tables-from-research-articles/)

+ [gganimate vs. plotly... See how the two #rstats animation packages compare](https://www.brucemeng.ca/post/animations-in-r/)

![gganimate vs. plotly... See how the two #rstats animation packages compare](https://www.brucemeng.ca/img/gganimate.gif)

+ [R Tip: Use stringsAsFactors = FALSE](http://www.win-vector.com/blog/2018/03/r-tip-use-stringsasfactors-false/)

+ [Visualizing MonteCarlo Simulation Results: Mean vs Median](https://firstdifferences.wordpress.com/2018/03/15/visualizing-montecarlo-simulation-results-mean-vs-median/)

+ [Comparing additive and multiplicative regressions using AIC in R](https://forecasting.svetunkov.ru/en/2018/03/22/comparing-additive-and-multiplicative-regressions-using-aic-in-r/)

+ [R Tip: Break up Function Nesting for Legibility](http://www.win-vector.com/blog/2018/03/r-tip-break-up-function-nesting-for-legibility/)

+ [AI, Machine Learning and Data Science Roundup: March 2018](http://blog.revolutionanalytics.com/2018/03/aimlds-roundup-march-2018.html)

+ [Plotting and subsetting stars objects](http://r-spatial.org//r/2018/03/22/stars2.html)

+ [Using stars for remote big Earth Observation data processing](http://r-spatial.org//r/2018/03/23/stars3.html)

+ [gofast](https://purrple.cat/blog/2018/03/23/gofast/) - go file abstract syntax tree r package

<!--<div class="post-more-begin"></div><div class="post-more-end"></div>-->

###  R Project Updates

Updates from [R Core](http://developer.r-project.org/blosxom.cgi/R-devel/NEWS):

+ All packages are by default byte-compiled on installation. This makes the installed packages larger (usually marginally so) and may affect the format of messages and tracebacks (which often exclude `.Cal`l and similar).

+ The `"Date"` and “date-time” classes `"POSIXlt"` and `"POSIXct"` now have a working ``length<-`` method, as wished in PR#17387.

+ R has new serialization format (version 3) which supports custom serialization of `ALTREP` framework objects. These objects can still be serialized in format 2, but less efficiently. Serialization format 3 also records the current native encoding of unflagged strings and converts them when de-serialized in R running under different native encoding. Format 3 comes with new serialization magic numbers (RDA3, RDB3, RDX3). Format 3 can be selected by `version = 3` in `save()`, `serialize()` and `saveRDS()`, but format 2 remains the default for all serialization and saving of the workspace. Serialized data in format 3 cannot be read in R prior to version 3.5.0.

+ Using `\usage{ data(<name>, package="<pkg>") }` no longer produces `R CMD check` warnings.

###  Upcoming Events in 3 Months

Events in 3 Months:

+ New York R conference **Aprl 20-21** <br />
[New York R conference](https://www.rstats.nyc/), Discount Code : rladies

+ [eRum 2018](http://2018.erum.io) **May 14-16** <br />
European R Users Meeting @ Budapest, Hungary

+ R/Finance 2018 **June 1 and 2** <br />
[Applied Finance with R](http://www.rinfinance.com).

+ [CascadiaRConf](https://cascadiarconf.com/) **June 2**
Portland, OR, US

<!--
+ [7eme Rencontres R](https://r2018-rennes.sciencesconf.org/)  **July 5 & 6** <br />
Rennes - Agrocampus

+ [useR! 2018](https://user2018.r-project.org/) **July 10** <br />
The annual useR! conference is the main meeting of the international R user and developer community.

+ [LatinR 2018](http://latin-r.com/) **Sept 4-5** <br />
Buenos Aires, Argentina. -->

More past events at [R conferences & meetups](https://conf.rweekly.org).

###  Call for Participation

<p class="hide-support added-hostname support-rweekly" style="text-align: center;font-weight: bold;">Your <a class="non-visited externalLink" href="https://www.patreon.com/rweekly" onclick="pas(this)">support</a> will keep R Weekly team moving! 💡</p>

###  Quotes of the Week

<blockquote class="twitter-tweet" data-lang="ca"><p lang="en" dir="ltr">.<a href="https://twitter.com/rweekly_org?ref_src=twsrc%5Etfw">@rweekly_org</a> representatives at <a href="https://twitter.com/hashtag/sarRdayCapeTown?src=hash&amp;ref_src=twsrc%5Etfw">#sarRdayCapeTown</a> 📬 <a href="https://t.co/BXI5ZxpYId">pic.twitter.com/BXI5ZxpYId</a></p>&mdash; Maëlle Salmon 🐟 (@ma_salmon) <a href="https://twitter.com/ma_salmon/status/975033835275595776?ref_src=twsrc%5Etfw">17 de març de 2018</a></blockquote>

<blockquote class="twitter-tweet" data-lang="ca"><p lang="en" dir="ltr">.<a href="https://twitter.com/brookLYNevery1?ref_src=twsrc%5Etfw">@brookLYNevery1</a>: &quot;But once I pushed this to Github, I immediately became an open source developer and maintainer. That’s all it takes.&quot; 🚀<a href="https://t.co/eWxF2lRqEa">https://t.co/eWxF2lRqEa</a></p>&mdash; Maëlle Salmon 🐟 (@ma_salmon) <a href="https://twitter.com/ma_salmon/status/977566687984869376?ref_src=twsrc%5Etfw">24 de març de 2018</a></blockquote>

<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr">💡 dplyr::case_when goes really well with geom_text (or ggrepel) for when you want to programmatically label a few of the most interesting features in your <a href="https://twitter.com/hashtag/rstats?src=hash&amp;ref_src=twsrc%5Etfw">#rstats</a> plots! And the criteria can be as complex as you want 🎉 <a href="https://t.co/0jUp1uarde">pic.twitter.com/0jUp1uarde</a></p>&mdash; James Goldie (@rensa_co) <a href="https://twitter.com/rensa_co/status/976340414016843776?ref_src=twsrc%5Etfw">March 21, 2018</a></blockquote>