I have this dataframe, which I have data for US's states population for different time periods, I want to set the population of every state to its initial value
I've two dataframes DF1 and DF2. One of them is a very large DF. I've created examples DF1 and 2 like this: library(tidyverse) A<-rep(c('Mavs', 'Spurs', 'La
I have a list of dataframes that all have the same format (same number of rows, same number of columns and columns have the same name). I would like to create a
I'm importing CSV file to Rstudio. I use this command df <- read.csv("C:/Users/Ibad/Desktop/corona.csv") But I see there are many missing(NA) values in Rstu
How to set this plot in ascending order? many thanks in advance. library(ggplot2) library(reshape2) iris2 <- melt(iris, id.vars="Species"); iris2 ggplot(da
I am trying to include Pooled Standard Error (PSE) and Eta square to tbl_summary(). PSE is calculated by sqrt(mean(residuals^2)/n), I tried to calculate step by
I am trying to add a table that summarizes the info I have in a facet grid boxplot to the same plot. df<- structure(list(design = c("F", "F", "F", "F", "H",
Here is a small chunk of R from Luke Tierney's codetools package: if (! exists("callCC")) callCC <- function(fun) { value <- NULL delayedAssign("t
I want to paste together results within the same case_when statement (i.e., if multiple statements are true for a given row). I know that I could do something l
I'm doing some analysis and I had to impute some values. To do so, I write this chunk of code: A) set.seed(1) for (i in 2:length (Dataset[-c(8,11)])) { D
I have a simple long df where every element in the fi column should be a new column in the wide df. So the new df should have 10 columns A:J. The wide df should
I started a new project in Rstudio and selected the option to use renv. The first thing I did was type the command install.packages('sf') and R returned the mes
I once again have a question about the kwic() function from the quanteda package. I want to extract the five words around a specific keyword (in the example bel
Simplified example of a text i have after importing with readlines: text <- c("just", "stuff", "nothing", "interesting", "date", "06.05.2022", "number", "1/
I'm applying WGCNA to RNASeq data following this tutorial. For several functions it give me an error that the package functions are not found. > sft <- pi
I am currently trying to apply parallelization with the gmapsdistance package (driving mode = bicycling) to speed up the computation of the for loop that contai
I am trying to create summary tables. I want to split these by site and have a "Total" column. However, when I try to rename multiple columns AND use add_overal
I have a dataframe events with xy-coords of unique points. I have a dataframe all_nodes with xy-coords of network nodes. All points of events are also in all_no
Given a matrix like mat > set.seed(1) > mat <- matrix(rbinom(100,1,0.5),10,10) > rownames(mat) <- paste0(sample(LETTERS[1:2],10,replace=T),c(1:nr
Consider this function plus_x: y <- 1 plus_x <- function(input, x = y){ return(input + x) } here the y default-value for x is evaluated during the fun