Auto-size Height in R iframe
I'm trying to auto-size the Height on an iframe in R. Here is an example where it's very thin:header <- dashboardHeader(title = "Tools", titleWidth = 225) sidebar <- dashboardSidebar(width = 225,...
View ArticleDeploying arrange(desc(.)) on each variable passed previously via enquos
BackgroundUsing rlang I've a simple summary function for dplyr that counts a number of missing observations within a variable per provided groups. I would like to return the results in a descending...
View ArticleIssue in running SHAP with Keras model in R
I am running SHAP from the library shapper in R for a classification model intrepetation on a Keras 1D CNN...
View ArticleHow to receive EPSG code from PROJ4 string using R?
How to receive the EPSG code from a PROJ4 string using R?I have a bunch of raster datasets (randomly distributed all over the world, northern and southern hemisphere), with coordinate reference system...
View Articlehow do I apply the same function to the first column of all spreadsheets in...
setwd("C:\\Users\\Documents\spreadsheet") n <- dir(pattern = ".csv") files<- NULL for (i in n) { files[[i]] <- read.csv(i,sep = ";",header = T) } #class(files) [1] "list"I saved all...
View ArticleApply function to each row in dataset when conditions are met
I have a boolean variable (parent_boolean). If parent_boolean = True then I want to apply a function to table_name, if parent_boolean = False then I want to apply a different function to table_name in...
View ArticleWhat is the simplest way to make an interactive bar plot with multiple drop...
I know it sounds a bit basic, but I would like to make an interactive barplot which can handle multiple x and y axis whether the user would like to use it.I started it like this way however I know...
View Articleecharts4r gauge chart value in %
I have a minimal example and want to display value in percent. Any ideas? Here you can find the API documentation.maxValue <- 160 echarts4r::e_charts() %>% echarts4r::e_gauge( value =...
View Articletest for difference of means returns wrong result
I'm running the example of the R-intro manual:A = c(79.98, 80.04, 80.02, 80.04, 80.03, 80.03, 80.04, 79.97, 80.05, 80.03, 80.02, 80.00, 80.02) B = c(80.02, 79.94, 79.98, 79.97, 79.97, 80.03, 79.95,...
View ArticleHow to make a stacked bar chart in ggplot2?
I'm new to R language and I've some data which are formatted like that: I would like to get an ggplot with stacked bar like this: But I've no idea how doing it. I try a lot of things, but nothing...
View ArticleHow to plott an Interaction with categorical data (Example)
I know I have an Interaction on Posture and Sex and I want to visualize it. But it doesn't work as the picture shows (why are there vertical lines?)I let rank pictures (with in differences in Gender...
View ArticleSubtract values from different row
I have been trying to move my calculations from excel to R and just wonder if there is a way to replicate IF (that has a step).So my data is below and the results I get in excel with simple formula are...
View ArticleExtract dataframe from lm model object
Simple question for which I haven't been able to find the answer. I'm looking for a function that extracts the name of the data frame used as input from an lm model object. So for example, if I run...
View ArticleExtract raste cell value for large number of cells
I am working with raster files containing a large number of cells (~ 3*10^9). In your experience what is the most time- and/or memory-efficient way to extract the information from those cells for...
View ArticleHow to specify menuItem in ShinyDashboard?
I'm creating Shiny web app using shinydashboard package version 0.7.1.So I faced a problem that nothing happens when I specify menuItem.Here is the example:library(shinydashboard) library(sqldf)...
View ArticleCollapsing rows with the same identifier [closed]
I have a matrix table with multiple IDs which are duplicated and present (see figure 1) and I desire to collapse them, obtaining for each identifier the average of the multiple values in each column...
View ArticleR rewriting a for loop
I've got a loop in my code that I would like to rewrite so running the code takes a little less time to compete. I know you allways have to avoid loops in the code but I can't think of an another way...
View ArticleR time series multiple lines plot
I have a very big dataset of which i want to create a plot(ly) in R. The sample of my dataset is shown below:> new_data_2 # Groups: newdatum [8] date activity totaal <date> <fct>...
View ArticleHow can I correctly use the cluster plan in the R future (furrr) package
I am currently using furrr to create a more organized execution of my model. I use a data.frame to pass parameters to a function in a orderly way, and then using the furrr::future_map() to map a...
View ArticleCumulative sums vector in R
i have an assignment for studies and i need to create a function that takes a vector as input and creates another vector, which, at every position has a cumulative sum of the previous ones and itself,...
View Article