R is my go to language for statistical analysis. However, I do not enjoy working with R shiny to develop web applications. I find that the code becomes convoluted very quickly and I have never been able to complete large projects using it.
Gladly, we have R Plumber - a package that makes ridiculously simple to create APIs with simple R code. In this small post I will go through some examples on how to build R plumber APIs.
I am thrilled with how smooth the transition from R to python has been. Certainly the syntax similarities to do basic work in R and python has helped.
This is the first post out of a few where I will describe how to work with data frames in R and python. Although there are many ways to achieve the same results for the following examples, my goal was to keep the syntax and product as similar as possible between R and python. At least for me, doing this has facilitated my learning.
First off, a data frame is a 2-dimensional…
Recientemente empecé a hacer aplicaciones usando python. Dado que aún no me he familiarizado lo suficiente con las frameworks disponibles y que ya tiene tiempo que quería aprender ha hacer aplicaciones de tiempo real con socket.io, pensé que sería una buena idea intentar hacer un chat usando flask, Angular y socket.io para aprender.
socket.io es una librería que permite la comunicación entre el cliente y servidor a través de eventos. Para este simple chat decidí usar los siguientes tres eventos:
Aquí esta como se ve mi código…
This week I was trying to optimize some R code. The code involved a lot of loops to traverse a large data frame, so I thought was a good idea to first look at all my options and then decide what is the best way for me to implement such loops.
There are many ways to loops across datasets in R. Many times it is not even necessary to write a loop. For example if you just want to sum across columns in a data.frame, or get the mean, s.d. etc, there are functions such as
Fortunately (or unfortunately), I haven’t had the need to learn python in detail to carry out my main job functions. However, python has gained quite a lot of traction for data science and bioinformatics, thus I’ve decided to get up to speed during the few breaks I get.
Today I wanted to see how simple is to translate some very basic R code to python. Specifically, I wanted to see how to do the following in python:
For this particular exercise I will create a data frame with simulated…
Recently I started making web applications using python. Given I am so unfamiliar with the frameworks available and that I’ve always wanted to learn how to do realtime applications with socket.io, I thought was a good idea to try to make a chat with flask, socket.io and angular as an exercise.
So socket.io is a library that enables event-based communication between clients and a server. For this chat application, I thought the simplest thing would be to handle three different events:
To handle the first two events, this is…