Category "r"

R change title size in legend

I use the R base command "legend" to add a legend to a plot and I want the title of this legend to be bigger. In the help it says: cex: character expansion

mailR Error - Sending email to the following server failed: smtp.gmail.com:587 - ShinyProxy / Docker / Ubuntu

I am currently trying to publish my Shiny app via ShinyProxy and Docker. Unfortunately, my app does not work after publishing - on the PC itself it works withou

Reticulate fails automatic configuration in R package

I'm working on a R package, that makes use of reticulate to call some functions of a Python package I implemented, installable through pip. Following its docume

Cannot highlight text in R script

I am facing a rather weird issue, I am unable to highlight code in one of my R script. Highlighting works with the keyboard but not with the mouse and only for

Sarima show only plots

I have the following code that I am running in R: ```{r} library(astsa) data = c(1:500) mo1 = sarima(data,0,0,2) ``` It produces both the five plots I am inter

How to make function aliases?

I am trying to create aliases for functions in R. For example, to get the length of a vector in R: length(the_vector) #returns the length of the vector I w

plotting geom_text() with free scale facet_wrap

I would like to plot geom_text() in a facet_wrap with scale = free. I tried to use geom_blank() or, set each height on each graph, but it was not successful. Wo

Matplotlib in Rmarkdown/RStudio fails when calling LaTeX on `\$` with Anaconda

Problem description I am having to use Anaconda on Windows, and am trying to write an RMarkdown document, knitted into a pdf, where within the RMarkdown I am us

Why is SparkR-dropna not giving me the desired output?

I have applied the following code on airquality dataset available in R, which has some missing values. I want to omit the rows which has NAs library(SparkR) Sys

Is there a function for not-a-knot cubic splines?

I need to use the "not-a-knot" cubic spline for interpolation in my R scripts. Although there are some R packages for splines, none of them seem to consider th

Density plot based on time of the day

I've the following dataset: https://app.box.com/s/au58xaw60r1hyeek5cua6q20byumgvmj I want to create a density plot based on the time of the day. Here is what

emacs ess-indent-or-complete sends newline to R process

Occasionally, for reasons I can not determine, ess-indent-or-complete sends an input to the R console. In other words, I will be typing something, hit tab to au

Uploading zip with multiple files into a shiny application

I am trying to upload a zip file through my shiny app that contains a bunch of xml files in it, and then process them. My code looks something like this: libra

R - Data.table - Using variable column names in RHS operations

How do I use variable column names on the RHS of := operations? For example, given this data.table "dt", I'd like to create two new columns, "first_y" and "firs

Predict values in place of NA by using the original data frame?

I have a dataset and the row which I need has an NA value. If I use na.omit, the rows will be omitted; however, I need the row. Hence I need to predict a value

Combination of all pairs of rows using R

Here is my dataset: data <- read.table(header = TRUE, text = " group index group_index x y z a 1 a1 12 13 14 a 2 a2

R how to group part of overlapped values among rows?

I have a data frame that some rows that need to be further grouped by some of the overlapped values among rows col1, col2 a1, 2;3 a2, 2 a3, 3;4 a4, 4 a

How to connect across multiple consecutive missing data values using geom_line?

I have a similar problem to Q: Connecting across missing values with geom_line, but found the answers provided only connect the lines when there is one missing

bipartite graph for the yelp dataset rstudio

I am trying to produce a bipartite graph for a yelp sample dataset. If the user reviews one restaurant, one edge will connect this user and the restaurant, that

How to convert list of list into a dataframe with differential list structure

I applied machine learning algorithm with caret package (caretlist) to predict death in a cohort of patients according to multiple variables (e.g. age, gender,