Blog Archives

Vectorizing functions in R is easy

April 16, 2019
By

Imagine you have a function that only takes one argument, but you would really like to work on a vector of values. A short example on how function Vectorize() can accomplish this. Let's say we have a data.frame xy

Read more »

How I implemented googleSignIn in R (shiny) and lived

March 15, 2019
By
How I implemented googleSignIn in R (shiny) and lived

Known user identity when building shiny apps can sometimes come really handy. While you can implement your own user login, for instance using cookies, you can also use some of the services which authenticate a user for you, such as Google. This way, yo...

Read more »

How to authenticate using OAuth2 through R

January 19, 2019
By
How to authenticate using OAuth2 through R

If you need to have authentication of users in your application, you could invent the proverbial warm water by implementing register, login, logout and other features. Or, you could outsource part of that functionality to well established establishments such as Google, Facebook, Github and other. In addition to knowing the identity of your user, you can potentially gain access...

Read more »

How to authenticate using OAuth2 through R

January 19, 2019
By
How to authenticate using OAuth2 through R

If you need to have authentication of users in your application, you could invent the proverbial warm water by implementing register, login, logout and other features. Or, you could outsource part of that functionality to well established establishments such as Google, Facebook, Github and other. In addition to knowing the identity of your user, you can potentially gain access...

Read more »

How to combine plots and table made with ggplot (or grid graphics) in R

October 1, 2018
By
How to combine plots and table made with ggplot (or grid graphics) in R

In the last few years, a number of options of how to combine grid graphics (incl. ggplot2) have emerged. If you can't remember all functions to do this, this post may serve as a reference guide, but it's mostly for me because I keep forgetting the functionalities provided by cowplot and patchwork packages (thank you Jaap). Here appearing in order I...

Read more »

How to combine plots and table made with ggplot (or grid graphics) in R

October 1, 2018
By
How to combine plots and table made with ggplot (or grid graphics) in R

In the last few years, a number of options of how to combine grid graphics (incl. ggplot2) have emerged. If you can't remember all functions to do this, this post may serve as a reference guide, but it's mostly for me because I keep forgetting the functionalities provided by cowplot and patchwork packages (thank you Jaap). Here appearing in order I...

Read more »

Point arrows to specific parts of the data

April 13, 2018
By
Point arrows to specific parts of the data

tl;dr: Point arrows at your line at defined datum points. Sometimes to really enhance your picture you need to point at some stuff. Here is a script which will plot vertical lines to show events in your datum plot. library(ggplot2) # This script will draw points to parts of (interpolated) lines. arrow.length

Read more »

Point arrows to specific parts of the data

April 13, 2018
By
Point arrows to specific parts of the data

tl;dr: Point arrows at your line at defined datum points. Sometimes to really enhance your picture you need to point at some stuff. Here is a script which will plot vertical lines to show events in your datum plot. library(ggplot2) # This script will draw points to parts of (interpolated) lines. arrow.length

Read more »

Search R-bloggers

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)