Re: [R] Accessing Data From packages

2020-02-27 Thread Stefan Schreiber
>From the "Companion to Analyzing Baseball Data with R" on GitHub (https://github.com/maxtoki/baseball_R) it says: "In order to have a working copy of the code in the book, download the zip file of this repository and extract the content of the zip file in a folder of your convenience. The data fo

Re: [R] Annotate question

2020-02-19 Thread Stefan Schreiber
Since factor levels (groups) are coded by integers, you can use 1, 2, 3 etc. as your x values. If you want to annotate in between you can simply pick values in between 1, 2, 3, etc. On Wed, Feb 19, 2020, 13:26 Thomas Subia, wrote: > Colleagues, > > To add an annotation using ggplot, I've used >

[R] object.size vs lobstr::obj_size

2020-02-17 Thread Stefan Schreiber
I am currently working through Advanced R by H. Wickham and came across the `lobstr::obj_size` function which appears to calculate the size of an object by taking into account whether the same object has been referenced multiple times, e.g. x <- runif(1e6) y <- list(x, x, x) lobstr::obj_size(y) #

Re: [R] density vs. mass for discrete probability functions

2019-03-16 Thread Stefan Schreiber
be interpreted as integrals wrt counting > measure, hence sum_{x in A} f(x) and int_A f(x) dx are essentially the same > concept. > > -pd > > > On 15 Mar 2019, at 01:43 , Stefan Schreiber > wrote: > > > > Dear R users, > > > > While experimenting with

[R] density vs. mass for discrete probability functions

2019-03-15 Thread Stefan Schreiber
Dear R users, While experimenting with the dbinom() function and reading its documentation (?dbinom) it reads that "dbinom gives the density" but shouldn't it be called "mass" instead of "density"? I assume that it has something to do with keeping the function for "density" consistent across discr