159 Matching Annotations
  1. Last 7 days
    1. (7) ReconfigBehSci on Twitter: “@ToddHorowitz3 probably- and I think there are many interesting questions around why he is there and whether he should be there. But to answer those properly, looking at the performance of the model seems important and interesting to me- that is all I am saying” / Twitter. (n.d.). Retrieved March 6, 2021, from https://twitter.com/SciBeh/status/1324389147050569734

    1. ReconfigBehSci. (2020, November 5). @ToddHorowitz3 2/2 so I would prefer to treat this as an opportunity for empirical observation and learning. Evaluation should focus on trying to assess actual contribution, not a priori judgments. [Tweet]. @SciBeh. https://twitter.com/SciBeh/status/1324367278352355330

  2. Apr 2021
  3. Mar 2021
  4. Feb 2021
    1. unnest_wider

      unnest_wider( data, col, names_sep = NULL, simplify = TRUE, names_repair = "check_unique", ptype = list(), transform = list() )

    2. unnest_wider

      unnest_wider( data, col, names_sep = NULL, simplify = TRUE, names_repair = "check_unique", ptype = list(), transform = list() )

    3. unnest_wider

      unnest_wider( data, col, names_sep = NULL, simplify = TRUE, names_repair = "check_unique", ptype = list(), transform = list() )

    4. unnest_longer

      unnest_longer( data, col, values_to = NULL, indices_to = NULL, indices_include = NULL, names_repair = "check_unique", simplify = TRUE, ptype = list(), transform = list() )

    5. unnest_longer

      unnest_longer( data, col, values_to = NULL, indices_to = NULL, indices_include = NULL, names_repair = "check_unique", simplify = TRUE, ptype = list(), transform = list() )

    6. unnest_longer

      unnest_longer( data, col, values_to = NULL, indices_to = NULL, indices_include = NULL, names_repair = "check_unique", simplify = TRUE, ptype = list(), transform = list() )

    7. unnest_wider

      unnest_wider( data, col, names_sep = NULL, simplify = TRUE, names_repair = "check_unique", ptype = list(), transform = list() )

    8. unnest_wider

      unnest_wider( data, col, names_sep = NULL, simplify = TRUE, names_repair = "check_unique", ptype = list(), transform = list() )

    9. hoist

      hoist( .data, .col, ..., .remove = TRUE, .simplify = TRUE, .ptype = list(), .transform = list() )

    1. Sass

      Define variables, such as colors (e.g. $primary: #337ab7) in Sass (styles.scss) then compile to css for web.

      R library "bootstraplib" built on foundation of "sass".

      Use "run_with_themer()" to get a live preview GUI for customizing bootstrap theme.

      Also, use "shinyOptions(plot.autocolors=TRUE)" at top of app to get plot outputs that respect Dark Mode.

  5. Jan 2021
  6. Dec 2020
  7. Nov 2020
    1. Let’s fit regression line to our model:

      plot() and lines() seem to plot regression lines

      • Can they be added to a ggplot?
      • Can they be used to print R2 on the plot?
  8. Oct 2020
    1. You need to get out of the habit of thinking using quotes is ugly. Not using them is ugly! Why? Because you've created a function that can only be used interactively - it's very difficult to program with it. – hadley

      Does it seem like Hadley still stands by this statement after tidy evaluation from this article <Do you need tidyeval>

    1. In practice, functional programming is all about hiding for loops, which are abstracted away by the mapper functions that automate the iteration.
    1. All figures were created using R Statistical Computing Software version 3.6.3 (R Core Team, 2020), relying primarily on the dplyr package (Wickham et al., 2015) for data manipulation and the ggplot2 package (Wickham 2016) for plotting. The code used to create each figure can be found at https://github.com/mkc9953/SARS-CoV-2-WW-EPI/tree/master.
  9. Sep 2020
    1. The neighbour‐joining tree was prepared with the R package {Ape} (Paradis, Claude, & Strimmer, 2004) and visualized using the R package {ggtree} (Yu, Smith, Zhu, Guan, & Lam, 2017).
  10. Aug 2020
  11. Jul 2020
  12. Jun 2020
    1. How to prevent the environment from being “invalidated”?Docker containers (Rocker)

      Rocker

    2. SAS, R, Stata, SPSS may return different results even for quantiles, or due to floating number representation! The results should be maximally close to each other, but what about resampling methods (SAS and R gives different random numbers for the same seed)?

      Different results between SAS, R, Stata, SPSS

    3. 99.9% open-source. 0.1% is licensed (free for non-commercial use)

      License of libraries in R

    4. Status of R on the Clinical Research market
      • In general bioscience and academia, S ---> R has built over years its position of one of the industry standards
      • In clinical research, however, SAS reigns par excellence
      • Pharmaceutical companies, CROs and even FDA do use R “internally”.But they resist (or hesitate) to use it in submissions (to FDA)
      • Clinical Programmer or Biostatistician ≝ SAS Programmer. Period
    5. Differences in

      Differences between R and SAS:

      • origin of dates
      • default contrasts
      • used sum of squares
      • calculation of quantiles
      • generation of random numbers
      • implementation of advanced model
      • representation of floating point numbers
    6. Tospeeduptheprocesswithoutsacrificingaccuracy,theteamalsousesRevolutionRanalyticproducts

      Revolution R

    1. In most programming languages, you can only access the values of a function’s arguments. In R, you can also access the code used to compute them. This makes it possible to evaluate code in non-standard ways: to use what is known as non-standard evaluation
  13. May 2020
    1. You can create estimation plots here at estimationstats.com, or with the DABEST packages which are available in R, Python, and Matlab.

      You can create estimation plots with:

  14. Apr 2020
    1. Pharma, which is one of the biggest, richest, most rewarding and promising industries in the world. Especially now, when the pharmaceutical industry, including the FDA, allows R to be used the domain occupied in 110% by SAS.

      Pharma industry is one of the most rewarding industries, especially now

    2. CR is one of the most controlled industries in this world. It's insanely conservative in both used statistical methods and programming. Once a program is written and validated, it may be used for decades. There are SAS macros written in 1980 working still by today without any change. That's because of brilliant backward compatibility of the SAS macro-language. New features DO NOT cause the old mechanisms to be REMOVED. It's here FOREVER+1 day.

      Clinical Research is highly conservative, making SAS macros applicable for decades. Unfortunately, that's not the same case with R

  15. Mar 2020
    1. Thanks to ggforce, you can enhance almost any ggplot by highlighting data groupings, and focusing attention on interesting features of the plot
    1. Descriptive Statistic

      R provides a wide range of functions for obtaining summary statistics. One method of obtaining descriptive statistics is to use the sapply( ) function with a specified summary statistic.

    1. dplyr in R also lets you use a different syntax for querying SQL databases like Postgres, MySQL and SQLite, which is also in a more logical order
    1. We save all of this code, the ui object, the server function, and the call to the shinyApp function, in an R script called app.R

      The same basic structure for all Shiny apps:

      1. ui object.
      2. server function.
      3. call to the shinyApp function.

      ---> examples <---

    2. ui

      UI example of a Shiny app (check the code below)

    3. server

      Server example of a Shiny app (check the code below):

      • random distribution is plotted as a histogram with the requested number of bins
      • code that generates the plot is wrapped in a call to renderPlot
    4. I want to get the selected number of bins from the slider and pass that number into a python method and do some calculation/manipulation (return: “You have selected 30bins and I came from a Python Function”) inside of it then return some value back to my R Shiny dashboard and view that result in a text field.

      Using Python scripts inside R Shiny (in 6 steps):

      1. In ui.R create textOutput: textOutput("textOutput") (after plotoutput()).
      2. In server.R create handler: output$textOutput <- renderText({ }].
      3. Create python_ref.py and insert this code:
      4. Import reticulate library: library(reticulate).
      5. source_python() function will make Python available in R:
      6. Make sure you've these files in your directory:
      • app.R
      • python_ref.py and that you've imported the reticulate package to R Environment and sourced the script inside your R code.

      Hit run.

    5. Currently Shiny is far more mature than Dash. Dash doesn’t have a proper layout tool yet, and also not build in theme, so if you are not familiar with Html and CSS, your application will not look good (You must have some level of web development knowledge). Also, developing new components will need ReactJS knowledge, which has a steep learning curve.

      Shiny > Dash:

      • Dash isn't yet as stabilised
      • Shiny has much more layout options, whereas in Dash you need to utilise HTML and CSS
      • developing new components in Dash needs ReactJS knowledge (not so easy)
    6. You can host standalone apps on a webpage or embed them in R Markdown documents or build dashboards. You can also extend your Shiny apps with CSS themes, Html widgets, and JavaScript actions.

      Typical tools used for working with Shiny

    7. You can either create a one R file named app.R and create two seperate components called (ui and server inside that file) or create two R files named ui.R and server.R

  16. Feb 2020
  17. Dec 2019
    1. “A measure from 0.0 to 1.0 describing the musical positiveness conveyed by a track. Tracks with high valence sound more positive (e.g. happy, cheerful, euphoric), while tracks with low valence sound more negative (e.g. sad, depressed, angry).”

      What is valence in music according to Spotify?

  18. Nov 2019
  19. Oct 2019
  20. Jun 2019
  21. varsellcm.r-forge.r-project.org varsellcm.r-forge.r-project.org
    1. missing values are managed, without any pre-processing, by the model used to cluster with the assumption that values are missing completely at random.

      VarSelLCM package

  22. May 2019
    1. Some of the best and cheapest tombstones come from India. In 2013 India produced 35,342 million tons of granite, making it the world’s largest producer

      This is interesting to me because I guess I never really thought about where the tombstones came from, I just knew that they came engaved and i never thought about who had to do it

  23. Apr 2019
  24. Feb 2019
    1. Network centralization

      degree.cent <- centr_degree(g, mode = "all") degree.cent$res degree.cent$centralization degree.cent$theoretical_max

  25. Dec 2018
    1. I came across this via the cran.r-project, referred to be a computer scientist at an NIH lecture. It might be an interesting source to see code-sharing norms and practices.