I'm trying to get 300 dpi images with ggsave, and am only getting the default 72 dpi. Here's an example of the code I'm using: library(tidyverse) x <- rnorm(
How to efficiently multiply columns of two different data frames with same number of rows but different number of columns. I have two data sets Volumes and pri
Is it possible calculated stock using R? The formula is stock+purchase-sold. In this case first stock (row1) is 0, rg first result stockB1= 12 - 3 = 9 the secon
I've got a data frame that contains names that are grouped, like so: df <- data.frame(group = rep(letters[1:2], each=2), name = LETTERS[1:4
I've created a logistic regression formula regarding mpg for various makes and models of cars. One variable "origin" was integer with : 1=American, 2=German, 3=
I am trying to sort people in my dataset into three body-size categories (Small, Medium, Large). Consider the toy example below: library(ggplot2) library(dplyr)
I have a list in which each element contains a data frame with n nrows. For example, dfA <- data.frame(A=c("a","a","a")) dfB <- data.frame(B=c("b","b")) d
Big Update I found an inefficient, but working solution for finding peaks and peak interval, although it doesn't work for multiple groups(in the code below I us
I'm trying to use the neuralnet package to train a model on this data set. However, I'm getting the following error which I can't understand: Error: the err
Im currently working for a Dutch football club and run into some problems with getting the length of relationship of certain fans. In the image below a short ov
I am having a problem rendering more than one trelliscopejs displays in an html file created with Rmarkdown. I'm using self_contained=TRUE in order to render di
I cannot find how to insert a line break in long titles inside nodes. For example: library(DiagrammeR) mermaid(" graph TB A[GE Solution]-->C{ } B[
In R, how can I produce a list of dates of all 2nd to last Wednesdays of the month in a specified date range? I've tried a few things but have gotten inconsiste
I'm maintaining R code in my company that is use by multiple colleagues. I decided to convert my code into a package to make it simpler to share, maintain and
I have a zip file containing data in a private Github repo. I am writing some R code, and I wish to download the data into R. When I run the following code I ge
I currently have the following problem: I extracted some data via the crunchbase API, resulting in a big nested list of the following structure (there are many
I've been trying to set up my R using conda (eventually to use with Beaker Notebook) and I want to be able to use RStudio with my conda-installed version of R
The map above renders perfectly fine in the following scenarios: List item RStudio Viewer Shiny app Shiny app using a minimal Shiny dashboard sceleton When
So I recently finished my R notebook, and noticed something once i decided to knit the markdown file. None of the headings or bullet points were working! I had
I'm using plm package to analyse my panel data, which comprises a set of states for 14 years. In the course of running plm regressions, I've encountered a lot o