source R-bloggers.com
A social graph of package Co-authors using tidyverse
plus ggraph
, an extension for ggplot2
for graphs (aka networks) and igraph
, an extremely powerful network analysis library. Find the code and additional explanation here.
source R-bloggers.com
source R-bloggers.com
Another area were R has seen much development is text analysis. New packages provide access to lightning fast C++ string libraries, 'new' data formats such as html, xml, and json, and also to the API of social platforms, such as facebook.com and twitter.com.
Package | Description |
---|---|
tm , tidytext |
General text analysis packages |
stringr , stringi |
String operations and regular expressions. |
rvest , XML |
Scraping content of the internet |
text2vec |
Create vector representation of words. |
SentimentAnalysis |
Sentiment analysis. |
twitteR , streamR , jsonlite |
Streaming and parsing tweets. |
Rfacebook |
Accessing the Facebook API. |
source Barbieri, F., Ronzano, F., & Saggion, H. (2016, May). What does this Emoji
Mean?A Vector Space Skip-Gram Model for Twitter Emojis. In LREC.
See also my natural language course page.
Alexander Nix, Cambridge Analytica
source spectator.imgix.net
"If there is a new statistical method, it is first implemented in R"
-- duw
Package | Description |
---|---|
stats |
Many individual tests plus all the distributions in the world. |
lme , glm |
(Generalized) linear models. |
lme4 , afex |
Mixed-mode, hierarchical regression. |
caret , mlr , e1071 , rpart , etc. |
Machine learning. |
BayesFactor , rstanarm |
Bayesian linear models. |
rjags , rstan |
Bayesian graphical models. |
forecast , mgm , timeSeries , etc. |
Time series models. |
cluster , fastcluster , cstab , etc. |
Cluster analysis. |
# Get Kerasinstall.packages(keras)library(keras)install_keras()# Define modelmodel <- keras_model_sequential() model %>% layer_dense(units = 256, activation = 'relu', input_shape = c(784)) %>% layer_dropout(rate = 0.4) %>% layer_dense(units = 128, activation = 'relu') %>% layer_dropout(rate = 0.3) %>% layer_dense(units = 10, activation = 'softmax')
Recent years several convenient and efficient packages for Bayesian statistics have been developed, facilitating a shift to a more informative and consistent statistical framework.
source labtimes.org
# load packagelibrary(BayesFactor)# define datax <- rnorm(100, 0, 1)y <- rnorm(100, 1, 1)# run Frequentist analysist.test(x, y)# run Bayesian analysisttestBF(x, y)
## Warning: package 'Matrix' was built under R version 3.4.4
## Bayes factor analysis## --------------## [1] Alt., r=0.707 : 5914249 ±0%## ## Against denominator:## Null, mu1-mu2 = 0 ## ---## Bayes factor type: BFindepSample, JZS
By now one of the most referenced R packages is Rcpp - R's interface to C++. With often relatively little effort due to Rcpp sugar, Rcpp can provide vast speed improvements, which many packages today rely on Rcpp in the background for swift code execution. Rcpp becomes particularly powerful, when supplemented with BH
, which makes avaialble a collection free, peer-reviewed C++ libraries, and RcppArmdillo, which available the high-performance Armadillo library for linear algebra methods.
source classic105.com
New packages also allow you to interact with Google Maps and Google Forms. Use ggmap
to access Google Maps and googlesheets
to access Google Forms.
library(ggmap)ggmap(get_map(c(7.588576, 47.559601),zoom=16))
An important part of programming is to keep track of the progress to potential be able to go back to an earlier version of the code. To achieve this, many programmers rely on version-control software such as GitHub. R and, in particular, RStudio work have inbuilt software that allow you to sync your project with an GitHub repository. Via the package called rdrop2
, R also interfaces with the popular cloud service Dropbox, which also allows for rudimentary version control.
With the need for more computing power for, e.g., machine learning, R is also moving more and more to the server and cluster sphere. Rstudio offers a convenient (and free) solution to access RStudio sessions on a remote linux server via a browser. RStdudio also offers the sparklyr
package integrating the Spark architecture for efficient cluster computing with dplyr
. Other packages exist to interface with Hadoop (RHadoop
) and SQL (RSQLite
).
The web is a great place to learn about R.
Best begin your journey with:Google or Rseek, which is a wrapper around google to maximize hits related to R. However, most of the time Google works just fine. Just be sure to add r to the the search query.
Then you will most likely be redirected to one of two pagesR-bloggers is a website on which R users inform each other on the newest developments. See, e.g., Nathaniel's entry.
Stackoverflow is a website on which R users exchange problems and solutions to problems. Try post something yourself. You will be amazed by the turnaround.
Feel free to contact us.
Dr. Dirk Wulff |
Dr. Nathaniel Phillips |
Markus Steiner |
---|
source R-bloggers.com
Keyboard shortcuts
↑, ←, Pg Up, k | Go to previous slide |
↓, →, Pg Dn, Space, j | Go to next slide |
Home | Go to first slide |
End | Go to last slide |
Number + Return | Go to specific slide |
b / m / f | Toggle blackout / mirrored / fullscreen mode |
c | Clone slideshow |
p | Toggle presenter mode |
t | Restart the presentation timer |
?, h | Toggle this help |
Esc | Back to slideshow |