Category "r"

Filtering using multiple variables and retaining those variables that meet criteria

I would like to filter using multiple variables in R. I got a way of doing so. How about if I only want to select the variables that meet the filtering criteria

I would like to use R Shiny to upload csv data to MySQL table and display

Apologies for the long question. I wrote the following R script to upload/append some csv files i get on a regular basis to a MySQL database. The examples files

Calculating Similarity Between Pairs of Documents in R [closed]

How can I calculate the cosine semantic similarity between pairs of word documents in R? Specifically, I have the plot (i.e., descriptions) of

Rstudio - cannot save files or open Rscripts 'The system cannot find the path specified'

Error when saving Rscripts Error when opening Rscripts Hi guys, Have been stuck on this problem for the past year or so and would really appreciate any help. I

lift chart R with glm model or multi class classification

Is it possible to create a lift chart for glm models in R ? I know it is more meant for binary classification model but my idea was to cut the target variable i

Rstudio very slow when editing large code

RStudio is working well in general (v 2021.09.1 Build 372). But when a large code (7000 lines, a collection of functions) is being edited, even a click on the t

How to change values in the dataset in R?

I need to calculate the average waste generated per week. But as seen in the dataset below. Some of the data is collected on a fortnightly basis and some on a w

How to export thousands of constants in an R package?

Goal I want to expose built-in constants from a package I am developing that come originally from C source code, being defined with #define directives. OpenGL

Listing to knitr environment (R-markdown error when using list2env in R chunks)

Edit: I figured out that the issue stems from the yaml code. It comes from applying this solution to dynamically name files. I believe it creates a parent envir

How to Authenticate with LDAP in R Shiny App

My company uses an LDAP server for authentication against an Active Directory. I need to authenticate users of a remotely hosted Shiny app using this. I managed

Getting the text values using Rvest

The page in question is this: https://tolltariffen.toll.no/tolltariff/headings/03.02?language=en (Click on OPEN ALL LEVELS to get the complete data) I'm using R

chromoMap error - subscript out of bounds

I am new to this community and hope my post is correct. I tried to run a test case on chromoMap using the chromosome file (chrom) and annotation file (anno) bel

R version 4.2.0 and Swedish letters (ä ö å) not working in newest R release. Anyone found a solution?

I have updated to the latest R release (R version 4.2.0), but I am now facing the problem that all the Swedish special letters cannot be read anymore. I am wor

R version 4.2.0 and Swedish letters (ä ö å) not working in newest R release. Anyone found a solution?

I have updated to the latest R release (R version 4.2.0), but I am now facing the problem that all the Swedish special letters cannot be read anymore. I am wor

rmarkdown slidy html presentation: image and text side by side

I'm looking for option to insert image and text together (side by side) on R-markdown Slidy HTML presentation. However I can't find anything for this. Please ca

R ggplot with 2 y-axes at different scales

The following is df_sales df_sales <- structure(list(Year_of_Release = c(2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013,

How to plot skew network data?

Using plot.igraph(), I have created a network graph using the following code: V(g)$color <- "orange" V(g)[name %in% data.set[[1]] ]$color <- "lightblue"

Position DT search box to center of table

I am having a hard time figuring out the code to position the search box from a DT table in a Shiny app to the middle. I'm using a DT extension package, called

Lay out multiple ggplot graphs on a page

I generate a list of ggplot objects inside a loop as follows: myPlots = list() for(i in 1:length(maturities)){ myPlots[[i]] <- ggplot(deltaIR.df, aes(samp

Density plot on Iris dataset with R

I want to plot a density plot of my dataset. This is my code: data <- iris plot(density(data$Sepal.Length), main="Density Plot", ylab="Frequency