Category "r"

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

fisher.test crash R with *** caught segfault *** error

As title said, fisher.test crash R with *** caught segfault *** error. Here is the code to produce the error: d<-matrix(c(1,0,5,2,1,90,0,0,0,1,0,14,0,0,0,0,0

GGPlot, fill by proportion with a geom_col()

I am trying to make each column fill by the proportion of each type of medal (Bronze, Silver, Gold) in relation to the Medal_sum for each country. Olympic_overa

rpivottable: How to Statically Show Values on rpivottable Where renderName is a Chart

Using rpivottable function in my code. rpivottable provides us readymade graph options which we can choose. eg 1. Heat map 2. Bar chart 3. Tree map 4. Horizonta

How to create a quiz score variable in R

I have a dataset in R similar to the following, where each row belongs to a person who has taken a quiz: example <- tibble(ID = c(1,2,3), a

Remove underscore and number at the end of string

I am working with a dataset that has column with some underscores. There is a patter to it but they are different patterns, as shown below ID Col1 1029

Tokenization of Compound Words not Working in Quanteda

I'm trying to create a dataframe containing specific keywords-in-context using the kwic() function, but unfortunately, I'm running into some error when attempti

R column with a strange value [duplicate]

In one column of my dataset the assignment of a record to a phase is listed. Phase I (I), Phase II (I), Phase III (I). Each dataset has an ass

Error - replacement has [x] rows, data has [y]

I have a numeric column ("value") in a dataframe ("df"), and I would like to generate a new column ("valueBin") based on "value." I have the following condition

pandas equivalent to mutate accros

I would like to perform following operation in Pandas: library(tidyverse) df <- tibble(mtcars) df %>% select(ends_with('t')) %>% head(3) # A