By Hadley Wickham.
Read or Download Advanced R PDF
Best probability & statistics books
Random matrix idea, either as an software and as a idea, has developed swiftly during the last fifteen years. Log-Gases and Random Matrices provides a entire account of those advancements, emphasizing log-gases as a actual photo and heuristic, in addition to protecting issues corresponding to beta ensembles and Jack polynomials.
Booklet by means of Moore, David S. , McCabe, George P. , Craig, Bruce
- Infinite Series: Ramifications
- Applying Contemporary Statistical Techniques
- Introduction to Mathematical Statistics
- Statistical Models in S (Chapman & Hall Computer Science Series)
- The Theory of Branching Processes
Extra resources for Advanced R
Simplifying subsets returns the simplest possible data structure that can represent the output, and is useful interactively because it usually gives you what you want. Preserving subsetting keeps the structure of the output the same as the input, and is generally better for programming because the result will always be the same type. Omitting drop = FALSE when subsetting matrices and data frames is one of the most common sources of programming errors. ) Unfortunately, how you switch between simplifying and preserving differs for diﬀerent data types, as summarised in the table below.
3. Test your knowledge of vector coercion rules by predicting the output of the following uses of c(): c(1, FALSE) c("a", 1) c(list(1), "a") c(TRUE, 1L) 4. Why do you need to use unlist() to convert a list to an atomic vector? vector() work? 5. Why is 1 == "1" true? Why is -1 < FALSE true? Why is "one" < 2 false? 6. Why is the default missing value, NA, a logical vector? What’s special about logical vectors? 2 Attributes All objects can have arbitrary additional attributes, used to store metadata about the object.
5. Implement your own function that extracts the diagonal entries from a matrix (it should behave like diag(x) where x is a matrix). 6. na(df)] <- 0 do? How does it work? 2 Subsetting operators There are two other subsetting operators: [[ and $. [[ is similar to [, except it can only return a single value and it allows you to pull pieces out of a list. $ is a useful shorthand for [[ combined with character subsetting. You need [[ when working with lists. This is because when [ is applied to a list it always returns a list: it never gives you the contents of the list.
Advanced R by Hadley Wickham.