Category "r"

possible to implement two sequential flyTo in leaflet R

I would like to create a Leaflet Map which renders at a default location, at a zoom level of 4, and then when the user clicks the go button, pans from location

How to prevent ifelse statement from clearing out previous data?

I'm trying to import some accounting data to a new software and need to add a debit column journalItemLine_debitAmount and a credit column journalItemLine_credi

arranging multiple plots with cowplot cuts off statistics

When arranging multiple plots from a plotlist with cowplot, the stat_compare_means values get cut off in the grid (see picture). When I am removing the plots ti

libstdc++.so.6: version `GLIBCXX_3.4.26' not found on Linux

I was trying to load Seurat package in rstudio and got this error Error: package or namespace load failed for ‘Seurat’ in dyn.load(file, DLLpath = D

Rstudio Rtools error?? 'Renviron contains invalid lines'

I use Rstudio. I got an error while using Rstudio. It's the same error as in the attached image. I uninstalled Rtools, Rstudio and R and then reinstalled them a

R, Python or Excel. How can I count time range occurrences happening during other time ranges?

Say for example, I want to count how many people are in a room while others are in that room for each day. When that person leaves, I want an updated count of h

Error in new.session() : Could not establish session after 5 attempts

I've been facing in R the error message for days using getSymbols of the quantmod package: Error in new.session() : Could not establish session after 5 attempts

How to send emails with delayed delivery in Outlook from R?

Using the RDCOMClient package in R, I am sending a series of automated emails from R. The emails need to be sent at a specific date and time, but I cannot figur

R markdown results='hold' but for messages?

I have functions outputting multiple messages in my code and I can't get these messages to be in the same output chunk, like with results='hold'. As of now, th

How to filter for variables in a column of one df from another df's column with unequal length in R?

I am trying to select for variables in a column of a DF using the variables from a column in another DF with different length. I am using Dplyer to filter. DF1

What is the best way to convert flexdashboard to a Shiny (ui, server)?

I have a flexdashboard application and I would like to convert it into two parts: ui and server. Is there any way (functions or workaround) to do this? A simple

download data from CoinMarketCap API

I want to download coinmarketcap of cryptocoins data. When compiling the code below: rm(list = ls()) cat("\014") library(httr) library(jsonlite) library(tidyver

Install R packages from the command line

I need to build a reproducible R installation from the command line. Seems easy enough, so I created a file with my package names of interest, for example pac

Read dat in R with separate variables instead of 1 single variable

I try to load a dat file into R with 4 separate variables, but the read.table/read.delim function returns to 1 single variable by connecting the 4 with a colon.

Native pipe with purrr::map_dfr()

I'd like to use the new native pipe,|>, with purrr::map_dfr(). (To make it reproducible, I'm passing the datasets as strings instead of paths, but that shou

How to SUM total number of a value per each month & year and join by other columns in R

Hey I've got this table: country date cases ---------------------------------------------------------- USA 2022

Extreme Bound Analysis (EBA) using ordered Probit in R

I am using Extreme Bound analysis (EBA). my dependent variable is ordinal. So i want to use ordered probit regression for computing EBA. I am using following co

R: Correct Way to Calculate Cosine Similarity?

I am working with the R programming language. I have the following data: text = structure(list(id = 1:8, reviews = c("I guess the employee decided to buy their

How to initialize workers to use package functions in parallel

I am developing an R package and trying to use parallel processing in it for an embarrassingly parallel problem. I would like to write a loop or functional that

Discriminant Analysis (FDA and MDA) plots in R

I am trying to plot the results of Flexible discriminant analysis(FDA) and Mixture discriminant analysis(MDA) using the mda and ggplot2 package. I did it for Li