Posts

Coronavirus Dashboard - Sri Lanka

The 2019 Novel Coronavirus COVID-19 (2019-nCoV) Data in Sri Lanka

Covid-19/ Coronavirus data in Sri Lanka

The 2019 Novel Coronavirus COVID-19 (2019-nCoV) Data in Sri Lanka

Weighted LOESS (LOcal regrESSion)

LOcal regrESSion (LOESS) or LOcally WEighted Scatter-plot Smoother (LOWESS) LOESS or LOWESS is a nonparametric technique to fit a smooth curve through points in a scatter plot. This approach uses locally estimated linear regression at its core. The following code illustrates how to include a loess line using the ggplot2 package. library(ggplot2) set.seed(1) x <- rnorm(60) y <- c(rnorm(40), 10, rnorm(19)) df <- data.frame(x=x, y=y) ## Without weights ggplot(data=df, aes(x=x, y=y)) + geom_point() + geom_smooth(method=loess, legend=FALSE) Furthermore, you can plot loess smoothing weighting the observations as follows:

Reporting your model outputs

Let’s see how to format your model outputs with parameters package in R by Lüdecke et al. (2020). Fit a simple linear regression model #install.packages("parameters") library(parameters) library(magrittr) library(gt) library(see) model <- lm(Volume ~ Height + Girth, data=trees) Reporting model parameter estimates model %>% model_parameters() Parameter | Coefficient | SE | 95% CI | t(28) | p -------------------------------------------------------------------- (Intercept) | -57.99 | 8.64 | [-75.68, -40.29] | -6.71 | < .

Organize your priorities using CalendR package in R

Maintaining a calendar to organize your events allows for having more smooth and productive day. In this post, I will show you some basic functionalities in CalendaR package.

Ratio matters: change the way you see things!

Aspect ratio: what it is and why it is. How often do you fix aspect ratio?

Highlight data points in a scatterplot

Highlight selected points in the scatterplot

Import data into R: Overwritten object names

Read data files

Working with built-in data sets in R

How to view datasets in a particular package, or or list the available data sets?

Small things matter!

Checks whether your package name is taken or available !!

install.packages("available")
library(available)
available("seer")
Warning: unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/src/contrib:
  cannot open URL 'http://www.stats.ox.ac.uk/pub/RWin/src/contrib/PACKAGES'
── seer ────────────────────────────────────────────────────────────────────────
Name valid: ✔
Available on CRAN: ✖ 
Available on Bioconductor: ✖
Available on GitHub:  ✖ 
Abbreviations: http://www.abbreviations.com/seer
Wikipedia: https://en.wikipedia.org/wiki/seer
Wiktionary: https://en.wiktionary.org/wiki/seer
Sentiment:???

This means the name seer is taken in both CRAN and GitHub.