How to Calculate Cosine Similarity in R

This tutorial will go through how to calculate the cosine similarity in R for vectors and matrices with code examples. Table of contentsWhat is Cosine Similarity?Visual Description of Cosine SimilarityCosine Similarity Between Two Vectors in RCosine Similarity of a...

How to Count the Number of NA in R

This tutorial will go through counting the number of missing values or NAs in a data frame in R. Table of contentsExampleGet Airquality DataSolution #1: Use summarySolution #2: Use sum and is.naSolution #3: Use sum and is.na in FunctionSummary Example Let’s look...