2021

How to Calculate Cosine Similarity in R

August 10, 2021 | finnstats

How to Calculate Cosine Similarity in R, The measure of similarity between two vectors in an inner product space is cosine similarity. The formula... The post How to Calculate Cosine Similarity in R appeared first on finnstats. [Read more...]

How to Create Pareto Chart in R

August 9, 2021 | finnstats

Pareto Chart in R, A Pareto graph is a type of graph that displays the frequencies of the different categories with the cumulated frequencies of the categories. How to create a Pareto chart in R This... The post How to Create Pareto Chart in R appeared first on finnstats.
[Read more...]

Cutting down code in dplyr and data.table

August 8, 2021 | HighlandR

After a very long , R free hiatus (I don’t recommend it) I’m back on the R train, destination unknown. I had a bit of spare time last night, and remembered I had not done a PreppinData challenge for a while. In fact, the last one I did was ... [Read more...]

Introducing the Redwall ‘Red Flag’ Explorer with New Constructs Data

August 8, 2021 | R on Redwall Analytics

Click to see R set-up code
# Libraries
if(!require("pacman")) {
  install.packages("pacman")
}
pacman::p_load(
  data.table,
  scales,
  ggplot2,
  plotly, 
  DT)

# Set knitr params
knitr::opts_chunk$set(
  comment = NA,
  fig.width = 12,
  fig.height = 8,
  out.width = '100%'
)

# Load annual data only
path <- 
  "~/Desktop/David/Projects/new_constructs_targets/_targets/objects/"
red_flags <- 
  readRDS(paste0(path, "nc_annual_red_flags"))
annual_data <- 
  readRDS(paste0(path, "nc_annual_final"))
Key Findings 1999-2000 was an exceptional period for both “Red Flag” prevalence and return differentiation, though apparent benefits of the strategy appear in most periods. Approximately 2.0% of filings we checked had 5 or more “Red Flags” among annual and quarterly filings, so sparsity is ...
[Read more...]

Fast SQL Server Imports with R

August 8, 2021 | R on Thomas Roh

Writing large datasets to SQL Server can be very slow using the DBI package with an odbc connection. The issue with writing data is that individual INSERT statements are generated for each row of data. I’ve also had issues with remote connections...
[Read more...]

Using R: plyr to purrr, part 1

August 8, 2021 | mrtnj

This is the second post about my journey towards writing more modern Tidyverse-style R code; here is the previous one. We will look at the common case of taking subset of data out of a data frame, making some complex R object from them, and then extracting summaries from those ...
[Read more...]

Pricing of FX Forward in R and Excel

August 8, 2021 | sang-heon lee

This post explains how to price a FX forward. We assume that 1) USD is the foreign currency and KRW the domestic one, 2) USD IRS zero curve and KRW FX implied zero curve are given. Before making a R code, we use Excel spreadsheet for the clear under...
[Read more...]

How to actually make a quality scatterplot in R

August 5, 2021 | R on R (for ecology)

Scatterplots are one of the most common types of data visualizations you will encounter as a biologist. They present the relationship between two continuous variables. We might take them for granted by their simplicity, but we shouldn’t assume the seeming intuition with which we can see and comprehend these ...
[Read more...]
1 41 42 43 44 45 118

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)